Skip to content

Glossary: Testing Web Apps

toMatchObject

Also written: toEqual

A Vitest matcher that checks only the fields you list and ignores the rest. `toEqual` needs the whole object to match.

Where the book teaches it

Related terms

toBeCloseToexpect.objectContaining