Skip to content
masterclass Buddy

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.

Subscribe
  • expect
  • toEqual
  • toMatchObject
  • not

Source: Expect · Jest. Checked 2026-11-03.