Let\'s say I have the following:
var myNumber = 5; expect(myNumber).toBe(5); expect(myNumber).toEqual(5);
Both of the above tests will pass
I think toEqual is checking deep equal, toBe is the same reference of 2 variable
it('test me', () => { expect([] === []).toEqual(false) // true expect([] == []).toEqual(false) // true expect([]).toEqual([]); // true // deep check expect([]).toBe([]); // false })