79462635

Date: 2025-02-24 06:45:44
Score: 2
Natty:
Report link

in jest testing

toBe - it will check value and type also like ===
toEqual - it will only compare values, not type like ==

Ex -

tempObj ={success: true};

expect(tempObj).toBe({success: true}} // false
expect(tempObj).toEqual({success: true}} // true

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sachin Durge