Jest · Matcher
toContainEqual
toContainEqual checks that an array contains an item with matching structure and values. It compares fields recursively instead of requiring the same object reference.
Last updated
Syntax
expect(received).toContainEqual(item)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toContaintoEqualtoStrictEqualexpect(value)