Jest · Function
expect
expect(value) starts a Jest assertion. Chain a matcher such as toBe, toEqual, or toThrow to check the value produced by your code.
Last updated
Syntax
expect(value)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
.not.resolves.rejects.toBe.toBeCloseTo.toEqual.toHaveBeenCalled.toThrow