Jest · Matcher
toBe
toBe checks whether a value is exactly equal to an expected value. It is Jest's basic exact-equality matcher.
Last updated
Syntax
expect(actual).toBe(expected)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expecttoEqualtoStrictEqualnottoBeCloseTo