Command
expect(value).toBe(expected)Explanation
expect is used to make assertions about values in your tests with various matchers.
Examples
Exact equality
expect(result).toBe(42)Array contains item
expect(array).toContain(item)Function was called
expect(fn).toHaveBeenCalled()