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