Skip to content
masterclass Buddy

Jest · Matcher

toBeInstanceOf

.toBeInstanceOf(Class) checks whether a value is an instance of a given class or constructor. It uses JavaScript's instanceof behavior.

Last updated

Syntax

expect(received).toBeInstanceOf(Class)

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

Subscribe
  • expect(value)
  • toBe
  • toBeNull
  • toBeDefined
  • toBeInstanceOf

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