Jest · Function
toEqual
toEqual compares object and array contents recursively. Use it when values should have the same data, even if they are different object instances.
Last updated
Syntax
expect(value).toEqual(expected)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expecttoBetoStrictEqualnot