Skip to content
masterclass Buddy

Jest · Module

objectContaining

expect.objectContaining checks that an object has selected properties. It allows extra properties and supports recursive matching.

Last updated

Syntax

expect.objectContaining(object)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • expect
  • toEqual
  • toHaveBeenCalledWith
  • expect.any
  • expect.anything
  • expect.not.objectContaining

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