Skip to content

Commit f7822eb

Browse files
authored
fix(deps): update ivya to fix empty aria tree snapshot (#10218)
1 parent 5ec8d45 commit f7822eb

6 files changed

Lines changed: 48 additions & 10 deletions

File tree

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"@vitest/runner": "workspace:*",
9292
"birpc": "catalog:",
9393
"flatted": "catalog:",
94-
"ivya": "^1.8.0",
94+
"ivya": "^1.8.1",
9595
"mime": "^4.1.0",
9696
"pathe": "catalog:",
9797
"rrweb-snapshot": "2.0.0-alpha.20",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/snapshots/test/domain-aria-inline.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ test('aria inline snapshot', async () => {
1818
expect(result.errorTree()).toMatchInlineSnapshot(`
1919
Object {
2020
"basic.test.ts": Object {
21+
"empty": "passed",
2122
"semantic match with regex in snapshot": "passed",
2223
"simple heading": "passed",
2324
},
@@ -34,11 +35,13 @@ test('aria inline snapshot', async () => {
3435
- paragraph: Original
3536
- button "1234": Pattern
3637
\`)
38+
39+
expect(document.body).toMatchAriaInlineSnapshot(\`\`)
3740
"
3841
`)
3942
expect(result.ctx?.snapshot.summary).toMatchInlineSnapshot(`
4043
Object {
41-
"added": 2,
44+
"added": 3,
4245
"didUpdate": false,
4346
"failure": false,
4447
"filesAdded": 1,
@@ -47,7 +50,7 @@ test('aria inline snapshot', async () => {
4750
"filesUnmatched": 0,
4851
"filesUpdated": 0,
4952
"matched": 0,
50-
"total": 2,
53+
"total": 3,
5154
"unchecked": 0,
5255
"uncheckedKeysByFile": Array [],
5356
"unmatched": 0,
@@ -66,6 +69,7 @@ test('aria inline snapshot', async () => {
6669
expect(result.errorTree()).toMatchInlineSnapshot(`
6770
Object {
6871
"basic.test.ts": Object {
72+
"empty": "passed",
6973
"semantic match with regex in snapshot": "passed",
7074
"simple heading": "passed",
7175
},
@@ -111,6 +115,7 @@ test('aria inline snapshot', async () => {
111115
expect(result.errorTree()).toMatchInlineSnapshot(`
112116
Object {
113117
"basic.test.ts": Object {
118+
"empty": "passed",
114119
"semantic match with regex in snapshot": Array [
115120
"Snapshot \`semantic match with regex in snapshot 1\` mismatched",
116121
],
@@ -125,6 +130,7 @@ test('aria inline snapshot', async () => {
125130
expect(result.errorTree()).toMatchInlineSnapshot(`
126131
Object {
127132
"basic.test.ts": Object {
133+
"empty": "passed",
128134
"semantic match with regex in snapshot": "passed",
129135
"simple heading": "passed",
130136
},
@@ -143,6 +149,8 @@ test('aria inline snapshot', async () => {
143149
- paragraph: Changed
144150
- button /\\\\d+/: Pattern
145151
\`)
152+
153+
expect(document.body).toMatchAriaInlineSnapshot(\`\`)
146154
"
147155
`)
148156
})

test/snapshots/test/domain-aria.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ test('aria snapshot', async () => {
1717
expect(result.errorTree()).toMatchInlineSnapshot(`
1818
Object {
1919
"basic.test.ts": Object {
20+
"empty": "passed",
2021
"semantic match with regex in snapshot": "passed",
2122
"simple heading and paragraph": "passed",
2223
},
@@ -25,6 +26,10 @@ test('aria snapshot', async () => {
2526
expect(readFileSync(snapshotFile, 'utf-8')).toMatchInlineSnapshot(`
2627
"// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2728
29+
exports[\`empty 1\`] = \`
30+
31+
\`;
32+
2833
exports[\`semantic match with regex in snapshot 1\`] = \`
2934
- paragraph: Original
3035
- button "1234": Pattern
@@ -38,7 +43,7 @@ test('aria snapshot', async () => {
3843
`)
3944
expect(result.ctx?.snapshot.summary).toMatchInlineSnapshot(`
4045
Object {
41-
"added": 2,
46+
"added": 3,
4247
"didUpdate": false,
4348
"failure": false,
4449
"filesAdded": 1,
@@ -47,7 +52,7 @@ test('aria snapshot', async () => {
4752
"filesUnmatched": 0,
4853
"filesUpdated": 0,
4954
"matched": 0,
50-
"total": 2,
55+
"total": 3,
5156
"unchecked": 0,
5257
"uncheckedKeysByFile": Array [],
5358
"unmatched": 0,
@@ -65,6 +70,7 @@ test('aria snapshot', async () => {
6570
expect(result.errorTree()).toMatchInlineSnapshot(`
6671
Object {
6772
"basic.test.ts": Object {
73+
"empty": "passed",
6874
"semantic match with regex in snapshot": "passed",
6975
"simple heading and paragraph": "passed",
7076
},
@@ -73,6 +79,10 @@ test('aria snapshot', async () => {
7379
expect(readFileSync(snapshotFile, 'utf-8')).toMatchInlineSnapshot(`
7480
"// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
7581
82+
exports[\`empty 1\`] = \`
83+
84+
\`;
85+
7686
exports[\`semantic match with regex in snapshot 1\`] = \`
7787
- paragraph: Original
7888
- button /\\\\d+/: Pattern
@@ -124,6 +134,7 @@ test('aria snapshot', async () => {
124134
expect(result.errorTree()).toMatchInlineSnapshot(`
125135
Object {
126136
"basic.test.ts": Object {
137+
"empty": "passed",
127138
"semantic match with regex in snapshot": Array [
128139
"Snapshot \`semantic match with regex in snapshot 1\` mismatched",
129140
],
@@ -138,6 +149,7 @@ test('aria snapshot', async () => {
138149
expect(result.errorTree()).toMatchInlineSnapshot(`
139150
Object {
140151
"basic.test.ts": Object {
152+
"empty": "passed",
141153
"semantic match with regex in snapshot": "passed",
142154
"simple heading and paragraph": "passed",
143155
},
@@ -146,6 +158,10 @@ test('aria snapshot', async () => {
146158
expect(readFileSync(snapshotFile, 'utf-8')).toMatchInlineSnapshot(`
147159
"// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
148160
161+
exports[\`empty 1\`] = \`
162+
163+
\`;
164+
149165
exports[\`semantic match with regex in snapshot 1\`] = \`
150166
- paragraph: Changed
151167
- button /\\\\d+/: Pattern

test/snapshots/test/fixtures/domain-aria-inline/basic.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ test('semantic match with regex in snapshot', () => {
2121
- button "1234": Pattern
2222
`)
2323
})
24+
25+
test("empty", () => {
26+
document.body.innerHTML = `
27+
<button aria-hidden="true">Hidden</button>
28+
`
29+
expect(document.body).toMatchAriaInlineSnapshot()
30+
})

test/snapshots/test/fixtures/domain-aria/basic.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ test('semantic match with regex in snapshot', () => {
1919
`
2020
expect(document.body).toMatchAriaSnapshot()
2121
})
22+
23+
test("empty", () => {
24+
document.body.innerHTML = `
25+
<button aria-hidden="true">Hidden</button>
26+
`
27+
expect(document.body).toMatchAriaSnapshot()
28+
})

0 commit comments

Comments
 (0)