Jest · Matcher
toStrictEqual
.toStrictEqual checks deep equality while also requiring matching structure and object type. It checks undefined properties, undefined array items, sparse arrays, and class instances more strictly than .toEqual.
Last updated
Syntax
expect(received).toStrictEqual(value)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expecttoEqualtoMatchObjectnot