Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 490 Bytes

what_are_jest_assertion_methods_.md

File metadata and controls

16 lines (9 loc) · 490 Bytes

What are Jest assertion methods?

Jest provides a variety of assertion methods, such as toBe(), toEqual(), toContain(), toHaveBeenCalled(), and more. These methods are used to check if values meet certain conditions.

Example:

expect(10).toBe(10);
expect([1, 2, 3]).toContain(2);

Tags: intermediate, Jest, Assertions