Vitest · Matcher
toMatchInlineSnapshot
toMatchInlineSnapshot checks a value against a snapshot written inside the test file. Vitest creates or updates that string, and the test fails when the value differs.
Last updated
Syntax
toMatchInlineSnapshot(shape?: Partial<T> | string, snapshot?: string, hint?: string) => voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toMatchSnapshottoMatchFileSnapshottoThrowErrorMatchingSnapshottoThrowErrorMatchingInlineSnapshotexpect.anysnapshotFormat