Vitest · Matcher
toEqual
toEqual checks that two values match. For objects, it compares their structure and values recursively, so separate objects with the same contents can pass.
Last updated
Syntax
expect(actual).toEqual(received)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toBetoStrictEqualtoContainEqualtoMatchObjecttoThrow