Skip to content
Open
Show file tree
Hide file tree
Changes from 185 commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
5d3c2ab
feat: aria snapshot
hi-ogawa Feb 15, 2026
986b451
feat: toMatchDomainInlineSnapshot
hi-ogawa Feb 15, 2026
5c9458d
feat: toMatchDomainSnapshot
hi-ogawa Feb 15, 2026
9e53df4
wip
hi-ogawa Feb 15, 2026
d965f3f
chore: design doc
hi-ogawa Feb 15, 2026
4df273d
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 11, 2026
54696d7
wip: revert slop
hi-ogawa Mar 11, 2026
1a2cdb2
test: wip
hi-ogawa Mar 11, 2026
0066bc0
wip: comment out more slop
hi-ogawa Mar 11, 2026
099cdd3
wip: custom match
hi-ogawa Mar 11, 2026
36a25a9
wip: aria
hi-ogawa Mar 11, 2026
011712e
wip: aria prototype
hi-ogawa Mar 11, 2026
9ab69f6
wip: aria domain
hi-ogawa Mar 11, 2026
832e4e1
wip: more aria
hi-ogawa Mar 11, 2026
3fccafe
docs: design
hi-ogawa Mar 11, 2026
e99d081
wip: docs
hi-ogawa Mar 11, 2026
477e642
test/snapshots/README.md
hi-ogawa Mar 11, 2026
83f9240
chore: cleanup
hi-ogawa Mar 11, 2026
0a75d63
test: split
hi-ogawa Mar 11, 2026
9158aad
test: gitignore
hi-ogawa Mar 11, 2026
dadbbe1
test: wip
hi-ogawa Mar 11, 2026
4716df1
test: wip
hi-ogawa Mar 11, 2026
7767628
test: wip
hi-ogawa Mar 11, 2026
f7e15ae
test: wip
hi-ogawa Mar 11, 2026
8cd7617
feat: partial update
hi-ogawa Mar 11, 2026
b183e4c
test: diff
hi-ogawa Mar 11, 2026
77282a9
design docs
hi-ogawa Mar 11, 2026
38e0cb1
refactor: remove slop `DomainMatchResult.mismatches`
hi-ogawa Mar 11, 2026
055f912
test: aria
hi-ogawa Mar 11, 2026
afe6d6a
design docs: inline
hi-ogawa Mar 11, 2026
0e1aa40
wip: inline
hi-ogawa Mar 11, 2026
2726322
test: inline e2e
hi-ogawa Mar 11, 2026
cc089ba
design docs: aria
hi-ogawa Mar 11, 2026
fc97217
feat: toMatchAriaSnapshot
hi-ogawa Mar 11, 2026
d481ef7
refactor: remove slop
hi-ogawa Mar 11, 2026
0e41364
test: more
hi-ogawa Mar 11, 2026
ce20c13
test: simplify
hi-ogawa Mar 11, 2026
009ec90
test: domain-aria-inline
hi-ogawa Mar 11, 2026
6208a2a
wip: aria better match
hi-ogawa Mar 11, 2026
259dbf2
feat: aria better match
hi-ogawa Mar 11, 2026
b6897de
test: rename
hi-ogawa Mar 11, 2026
ae5c302
test: update
hi-ogawa Mar 11, 2026
62670e9
test: update
hi-ogawa Mar 11, 2026
d62e9fd
chore: lint
hi-ogawa Mar 11, 2026
b4c123d
design docs: poll + snapshot via domain model
hi-ogawa Mar 11, 2026
580db2e
design docs: more on poll + snapshot
hi-ogawa Mar 11, 2026
6ebeaf5
wip: poll + domain snapshot
hi-ogawa Mar 11, 2026
b730f3a
wip: more on poll + snapshot
hi-ogawa Mar 11, 2026
3a214b9
test: more poll snapshot
hi-ogawa Mar 11, 2026
2d3fad9
wip: poll snapshot
hi-ogawa Mar 11, 2026
b78777e
wip: poll snapshot
hi-ogawa Mar 11, 2026
79b9748
wip: poll snapshot with timeout
hi-ogawa Mar 11, 2026
437ff9c
test: more
hi-ogawa Mar 11, 2026
700db56
chore: cleanup
hi-ogawa Mar 11, 2026
fea46b3
test: move code
hi-ogawa Mar 11, 2026
0ad314f
test: update snapshot
hi-ogawa Mar 12, 2026
f348173
test: browser mode + aria
hi-ogawa Mar 12, 2026
eb312df
refactor: consolidate four domain snapshots
hi-ogawa Mar 12, 2026
65533b4
test: wip poll + snapshot inline
hi-ogawa Mar 12, 2026
2eddd71
fix: poll + domain inline snapshot
hi-ogawa Mar 12, 2026
a52b717
test: poll domain inline snapshot e2e
hi-ogawa Mar 12, 2026
0396ce2
test: browser mode + aria
hi-ogawa Mar 12, 2026
ec5b402
fix: webkit curse
hi-ogawa Mar 12, 2026
059b421
chore: jsdoc experimental
hi-ogawa Mar 12, 2026
5d5bab4
refactor: remove slop
hi-ogawa Mar 12, 2026
a70ffe8
docs: aria snapshot
hi-ogawa Mar 12, 2026
2fcb89f
docs: experimental domain snapshot
hi-ogawa Mar 12, 2026
392b143
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 12, 2026
f3c40d3
docs: tweak
hi-ogawa Mar 12, 2026
9766a9a
refactor: remove slop
hi-ogawa Mar 12, 2026
7b8da57
chore: remove slop
hi-ogawa Mar 12, 2026
2dbaa4f
refactor: remove slop
hi-ogawa Mar 12, 2026
1bf5d5f
docs: update
hi-ogawa Mar 12, 2026
4cf4112
test: more coverage
hi-ogawa Mar 12, 2026
4df4fa5
fix: more aria
hi-ogawa Mar 12, 2026
f1b1242
test: more snapshot
hi-ogawa Mar 12, 2026
f7493c7
test: more aria
hi-ogawa Mar 12, 2026
6fb0517
chore: remove ai docs
hi-ogawa Mar 12, 2026
f2eae4c
fix: better aria match
hi-ogawa Mar 12, 2026
9b696b0
test: organize
hi-ogawa Mar 12, 2026
7aeccb8
fix: better aria udpate
hi-ogawa Mar 12, 2026
dfb90e3
test: more
hi-ogawa Mar 12, 2026
2027604
fix: aria psheudo attribute (link url, input placeholder)
hi-ogawa Mar 12, 2026
cd3fa2e
test: pseudo attribute with children
hi-ogawa Mar 12, 2026
4dbfa4a
chore: cleanup
hi-ogawa Mar 12, 2026
a55a1dc
chore: todo
hi-ogawa Mar 12, 2026
e9e8082
fix: inline aria inside loop
hi-ogawa Mar 12, 2026
ca0abbc
refactor: consolidate SnapshotState.match/matchDomain
hi-ogawa Mar 12, 2026
c38d008
chore: rename
hi-ogawa Mar 12, 2026
3cc7204
fix: replace Date.now with performance.now for measuring deadline
hi-ogawa Mar 12, 2026
4ae35b0
chore: move code
hi-ogawa Mar 12, 2026
2b47c4d
test: ws endpoint implies headless
hi-ogawa Mar 12, 2026
e24dbee
test: wip browser mode
hi-ogawa Mar 12, 2026
027213d
test: cleanup
hi-ogawa Mar 12, 2026
4ee88c7
fix: fix poll inline snapshot on firefox
hi-ogawa Mar 12, 2026
5afece7
test: full browser test
hi-ogawa Mar 12, 2026
1e0cc18
test: fix errorProjectTree
hi-ogawa Mar 12, 2026
d13a9fa
test: rolldown
hi-ogawa Mar 13, 2026
66dcfa5
test: snapshot for win
hi-ogawa Mar 13, 2026
1018ba9
test: more snapshot
hi-ogawa Mar 13, 2026
c3d48d5
test: rename
hi-ogawa Mar 13, 2026
4cd6546
test: consolidate
hi-ogawa Mar 13, 2026
48e9383
test: consolidate more
hi-ogawa Mar 13, 2026
f400313
test: more
hi-ogawa Mar 13, 2026
3328d9e
test: more
hi-ogawa Mar 13, 2026
7a9f42e
test: tweak
hi-ogawa Mar 13, 2026
0a7fde5
test: consolidate
hi-ogawa Mar 13, 2026
992e9e2
test: more
hi-ogawa Mar 13, 2026
bf6603d
test: more
hi-ogawa Mar 13, 2026
b040f37
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 13, 2026
b00490a
chore: comment
hi-ogawa Mar 13, 2026
666b46b
chore: more aria plan
hi-ogawa Mar 13, 2026
fa99722
chore: unused
hi-ogawa Mar 13, 2026
192d5aa
docs: aria.md
hi-ogawa Mar 13, 2026
de348ab
docs: wip
hi-ogawa Mar 13, 2026
26d1db7
docs: wip
hi-ogawa Mar 13, 2026
d921fae
docs: polish
hi-ogawa Mar 13, 2026
1b90efe
docs: wip
hi-ogawa Mar 13, 2026
f8414fe
docs: don't teach aria spec itself
hi-ogawa Mar 13, 2026
e25e29b
docs: refine aria snapshots guide
hi-ogawa Mar 13, 2026
df2b027
docs: domain snapshot details
hi-ogawa Mar 16, 2026
1d81e77
chore: update ivya
hi-ogawa Mar 18, 2026
e30ee94
wip: integrate ivya aria utils
hi-ogawa Mar 18, 2026
4fccea2
chore: remove slop comment
hi-ogawa Mar 18, 2026
60eee34
test: test ivya aria
hi-ogawa Mar 18, 2026
811069f
chore: move aria snapshot adapter to `@vitest/browser`
hi-ogawa Mar 18, 2026
beda188
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 18, 2026
cbe4414
Merge remote-tracking branch 'origin/feat-aria-snapshot' into feat-ar…
hi-ogawa Mar 18, 2026
09fa4d4
chore: cleanup unused
hi-ogawa Mar 18, 2026
ccd32bd
test: update browser mode test
hi-ogawa Mar 18, 2026
e54928b
docs: update to new aria
hi-ogawa Mar 18, 2026
919607f
refactor: simplify DomainMatchResult
hi-ogawa Mar 18, 2026
b932ee8
test: simplify slop
hi-ogawa Mar 18, 2026
d2fc250
refactor: minor slop
hi-ogawa Mar 18, 2026
3cf2570
docs: wip
hi-ogawa Mar 18, 2026
b8422e9
test: make kv example cooler
hi-ogawa Mar 18, 2026
1233118
docs: domain snapshot example
hi-ogawa Mar 18, 2026
c1e2a54
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 19, 2026
094c285
test: move tests
hi-ogawa Mar 19, 2026
12ed38c
test: test parse error
hi-ogawa Mar 19, 2026
f962ffc
fix: increase Error.stackTraceLimit for yaml parse error stack
hi-ogawa Mar 19, 2026
f92056d
chore(deps): update ivya
hi-ogawa Mar 19, 2026
f5ee886
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 19, 2026
c770fde
chore: remove yaml
hi-ogawa Mar 19, 2026
23983f1
chore: lint
hi-ogawa Mar 19, 2026
592ad57
chore: update ivya
hi-ogawa Mar 19, 2026
35a21d4
chore: cleanup tgz
hi-ogawa Mar 19, 2026
01643f0
chore: cleanup deps
hi-ogawa Mar 19, 2026
6ea37b7
chore: cleanup
hi-ogawa Mar 19, 2026
0de6507
fix: poll stable snapshot for initial and updated snapshot
hi-ogawa Mar 19, 2026
6ee3ce5
test: test stable snapshot
hi-ogawa Mar 20, 2026
19eb447
chore: todo
hi-ogawa Mar 20, 2026
e041f40
chore: todo
hi-ogawa Mar 20, 2026
6f10f8e
fix: rework pollAssertDomain and always require stable snapshot
hi-ogawa Mar 20, 2026
dae9360
refactor: minor slop
hi-ogawa Mar 20, 2026
525bda6
chore: comment
hi-ogawa Mar 20, 2026
95de460
refactor: minor
hi-ogawa Mar 20, 2026
06f1f9b
fix: poll both stable and match on existing snapshot
hi-ogawa Mar 20, 2026
afd2eb5
docs: document /children directive and YAML subset for aria snapshots
hi-ogawa Mar 20, 2026
ad3fb07
docs: rewrite browser mode retry behavior section
hi-ogawa Mar 20, 2026
1b9e283
test: wip
hi-ogawa Mar 20, 2026
d50d9c4
test: wip
hi-ogawa Mar 20, 2026
2271646
fix: fix poll timeout
hi-ogawa Mar 20, 2026
7f6e218
fix: fix poll mismatch error
hi-ogawa Mar 20, 2026
0a2bcf0
test: more
hi-ogawa Mar 20, 2026
2176fce
test: more
hi-ogawa Mar 20, 2026
ff5b3e9
test: port to inline
hi-ogawa Mar 20, 2026
6e9b860
docs: add experimental tags with version and sidebar entry for aria s…
hi-ogawa Mar 20, 2026
fbd1352
test: update
hi-ogawa Mar 20, 2026
6577e07
test: firefox blip
hi-ogawa Mar 20, 2026
b2ee333
refactor: rename slop
hi-ogawa Mar 20, 2026
5192571
fix: add assertionName to inline snapshot location validation error
hi-ogawa Mar 20, 2026
ee0924a
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 20, 2026
9aeeba9
docs: fix ARIA acronym casing and anchor consistency
hi-ogawa Mar 20, 2026
ba27b0b
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 22, 2026
2ad6077
docs: Aria -> ARIA
hi-ogawa Mar 23, 2026
276d481
docs: Update docs/guide/snapshot.md
hi-ogawa Mar 23, 2026
03b524b
docs: Ari
hi-ogawa Mar 23, 2026
d14f6aa
docs: Update packages/browser/src/client/tester/aria.ts
hi-ogawa Mar 23, 2026
9e26248
docs: Update packages/browser/jest-dom.d.ts
hi-ogawa Mar 23, 2026
add1888
Merge remote-tracking branch 'origin/feat-aria-snapshot' into feat-ar…
hi-ogawa Mar 23, 2026
dfd000d
docs: Update docs/guide/browser/aria-snapshots.md
hi-ogawa Mar 23, 2026
0041edb
docs: Update docs/guide/browser/aria-snapshots.md
hi-ogawa Mar 23, 2026
dca26a6
Merge remote-tracking branch 'origin/feat-aria-snapshot' into feat-ar…
hi-ogawa Mar 23, 2026
67949f1
docs: tidy up jsdoc
hi-ogawa Mar 23, 2026
7e9ca5c
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Mar 31, 2026
e002f9b
refactor: add matchDomain
hi-ogawa Mar 31, 2026
a984079
chore: fix merge conflict
hi-ogawa Mar 31, 2026
7406a75
refactor: copy assertMatchResult
hi-ogawa Mar 31, 2026
61f464e
refactor: pollAssertDomain -> pollMatchDomain
hi-ogawa Mar 31, 2026
a2c6143
refactor: remove assertXxx
hi-ogawa Mar 31, 2026
29cce4a
refactor: nit
hi-ogawa Mar 31, 2026
8145a2f
refactor: nit
hi-ogawa Mar 31, 2026
8de98d2
refactor: nit
hi-ogawa Mar 31, 2026
c72c7b1
refactor: towards custom matcher support
hi-ogawa Mar 31, 2026
78abf15
chore: lint
hi-ogawa Mar 31, 2026
d5c1a28
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Apr 1, 2026
9309f1a
test: dogfood aria snapshot in packages/ui
hi-ogawa Apr 1, 2026
6c7314d
test: more dogfooding
hi-ogawa Apr 1, 2026
44d81a8
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Apr 2, 2026
9cca550
merge: resolve snapshot conflict with custom matcher support
hi-ogawa Apr 2, 2026
d6fa7a9
fix: remove duplicate snapshot match helper after merge
hi-ogawa Apr 2, 2026
d19bd78
docs: bump snapshot experimental version tags to 4.1.3
hi-ogawa Apr 2, 2026
ac7c69d
docs: Update docs/guide/snapshot.md
hi-ogawa Apr 2, 2026
0803352
docs: more experimental
hi-ogawa Apr 2, 2026
af3f8d7
Merge remote-tracking branch 'origin/feat-aria-snapshot' into feat-ar…
hi-ogawa Apr 2, 2026
70d8406
refactor: nit r.pass
hi-ogawa Apr 2, 2026
09089df
chore: lint
hi-ogawa Apr 2, 2026
441ba7d
test: packages/ui test on ci
hi-ogawa Apr 2, 2026
e740a5d
test: use expect.element(result.locator)
hi-ogawa Apr 2, 2026
8533f7c
chore: reduce diff
hi-ogawa Apr 2, 2026
bb8207c
test: update
hi-ogawa Apr 2, 2026
e548675
chore: improve _resolveInlineStack debug error
hi-ogawa Apr 2, 2026
d0c22f1
fix/refactor: use __VITEST_POLL_CHAIN__ and STACK_TRACE_ERROR
hi-ogawa Apr 2, 2026
e6f4365
test: remove dup
hi-ogawa Apr 2, 2026
0fa75d8
refactor: bye __VITEST_POLL_PROMISE__
hi-ogawa Apr 2, 2026
c5c43f7
refactor: simplify assertDomainSnapshot
hi-ogawa Apr 2, 2026
c73afc8
refactor: remove unused
hi-ogawa Apr 2, 2026
c6da0b6
refactor: simiplify matchDomain
hi-ogawa Apr 2, 2026
a50c517
refactor: nit
hi-ogawa Apr 2, 2026
85ce4cf
refactor: make matchDomain tighter
hi-ogawa Apr 2, 2026
1a92e97
refactor: rename matchDomain -> processDomainSnapshot
hi-ogawa Apr 2, 2026
15b619d
chore: todo
hi-ogawa Apr 2, 2026
b359adb
test: update rolldown snapshot
hi-ogawa Apr 3, 2026
02d82be
refactor: use custom matcher for domain snapshot (#5)
hi-ogawa Apr 6, 2026
eb358c1
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Apr 6, 2026
e9ea61d
wip: move to Snapshots.toMatchDomain(Inline)Snapshot
hi-ogawa Apr 7, 2026
4b4a0b0
docs: update to Snapshots namespace
hi-ogawa Apr 7, 2026
1dc0272
test: refactor utils
hi-ogawa Apr 7, 2026
6a0db71
test: update exports
hi-ogawa Apr 7, 2026
d64264d
chore: revert unneeded
hi-ogawa Apr 7, 2026
3daea9f
test: cleanup comments
hi-ogawa Apr 7, 2026
78553a7
test: update snapshot
hi-ogawa Apr 7, 2026
1ff071a
Merge branch 'main' into feat-aria-snapshot
hi-ogawa Apr 8, 2026
a60ab07
fix: this.__vitest_assertion__ -> this.assertion
hi-ogawa Apr 8, 2026
6e02739
docs: tweak
hi-ogawa Apr 8, 2026
0395f71
docs: fix experimental API release markers
hi-ogawa Apr 8, 2026
52dddf7
docs: not this slop
hi-ogawa Apr 8, 2026
f87235f
docs: correct snapshot guide version markers
hi-ogawa Apr 8, 2026
f4736ac
docs: clarify aria snapshot whitespace normalization
hi-ogawa Apr 8, 2026
cde768a
test: test multiline paragraph
hi-ogawa Apr 8, 2026
d550648
chore: tweak comment
hi-ogawa Apr 8, 2026
2517f92
refactor: nit
hi-ogawa Apr 8, 2026
1a2fecb
chore: comment
hi-ogawa Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,11 @@ export default ({ mode }: { mode: string }) => {
link: '/guide/browser/trace-view',
docFooterText: 'Trace View | Browser Mode',
},
{
text: 'ARIA Snapshots',
link: '/guide/browser/aria-snapshots',
docFooterText: 'ARIA Snapshots | Browser Mode',
},
],
},
{
Expand Down
84 changes: 84 additions & 0 deletions docs/api/expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,77 @@ The same as [`toMatchSnapshot`](#tomatchsnapshot), but expects the same value as

The same as [`toMatchInlineSnapshot`](#tomatchinlinesnapshot), but expects the same value as [`toThrow`](#tothrow).

## toMatchAriaSnapshot <Version type="experimental">4.1.1</Version> <Experimental /> {#tomatcharisnapshot}

- **Type:** `() => void`

Captures the accessibility tree of a DOM element and compares it against a stored snapshot. Inspired by [Playwright's ARIA snapshots](https://playwright.dev/docs/aria-snapshots).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspired or based on?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified the paragraph here and removed the mention.


The snapshot uses a YAML-like format describing the accessible roles, names, and states of the element tree.

```ts
import { expect, test } from 'vitest'

test('navigation accessibility', () => {
document.body.innerHTML = `
<nav aria-label="Actions">
<button>Save</button>
<button>Cancel</button>
</nav>
`
expect(document.querySelector('nav')).toMatchAriaSnapshot()
})
```

On first run, Vitest generates a snapshot entry like:

```
- navigation "Actions":
- button: Save
- button: Cancel
```

See the [ARIA Snapshots guide](/guide/browser/aria-snapshots) for more details.

## toMatchAriaInlineSnapshot <Version type="experimental">4.1.1</Version> <Experimental /> {#tomatchariainlinesnapshot}

- **Type:** `(snapshot?: string) => void`

Same as [`toMatchAriaSnapshot`](#tomatcharisnapshot), but stores the snapshot inline in the test file.

See the [ARIA Snapshots guide](/guide/browser/aria-snapshots) for more details.

```ts
import { expect, test } from 'vitest'

test('user profile', () => {
expect(document.body).toMatchAriaInlineSnapshot(`
- heading "Dashboard" [level=1]
- button /User \\d+/: Profile
`)
})
```

## toMatchDomainSnapshot <Version type="experimental">4.1.1</Version> <Experimental /> {#tomatchdomainsnapshot}

- **Type:** `(domain: string, hint?: string) => void`

Matches a value against a stored snapshot using a registered [domain snapshot adapter](/guide/snapshot#custom-snapshot-domain). The `domain` argument is the adapter's `name`.

```ts
expect(value).toMatchDomainSnapshot('my-domain')
```

## toMatchDomainInlineSnapshot <Version type="experimental">4.1.1</Version> <Experimental /> {#tomatchdomaininlinesnapshot}

- **Type:** `(snapshot: string, domain: string, hint?: string) => void`

Same as [`toMatchDomainSnapshot`](#tomatchdomainsnapshot), but stores the snapshot inline in the test file.

```ts
expect(value).toMatchDomainInlineSnapshot(`...`, `my-domain`)
```

## toHaveBeenCalled

- **Type:** `() => Awaitable<void>`
Expand Down Expand Up @@ -2116,6 +2187,19 @@ If you are adding custom serializers, you should call this method inside [`setup
If you previously used Vue CLI with Jest, you might want to install [jest-serializer-vue](https://npmx.dev/package/jest-serializer-vue). Otherwise, your snapshots will be wrapped in a string, which cases `"` to be escaped.
:::

## expect.addSnapshotDomain <Version type="experimental">4.1.1</Version> <Experimental /> {#expect-addsnapshotdomain}

- **Type:** `(adapter: DomainSnapshotAdapter) => void`

Registers a [domain snapshot adapter](/guide/snapshot#custom-snapshot-domain) for use with `toMatchDomainSnapshot` and `toMatchDomainInlineSnapshot`. Call this in [`setupFiles`](/config/setupfiles).

```ts
import { expect } from 'vitest'
import { kvAdapter } from './kv-adapter'

expect.addSnapshotDomain(kvAdapter)
```

## expect.extend

- **Type:** `(matchers: MatchersObject) => void`
Expand Down
Loading
Loading