Skip to content
masterclass Buddy

Vitest · Matcher

toSatisfy

toSatisfy checks a value with a custom predicate. The assertion passes when the predicate returns true; use .not to reverse the check.

Last updated

Syntax

expect(value).toSatisfy(predicate)

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

Subscribe
  • expect
  • not
  • toBe
  • toEqual

Source: Using Matchers | Guide | Vitest. Checked 2026-11-03.