Skip to content

Commit dfb2159

Browse files
authored
test: update browser test for cdp.test-d.ts (#9804)
1 parent 0c2c013 commit dfb2159

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`basic 1`] = `1`;
3+
exports[`basic 1`] = `2`;

test/browser/specs/runner.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ describe('running browser tests', async () => {
6464
expect(events).toContain(`onBrowserInit ${project.name}`)
6565
})
6666

67-
// test files are optimized automatically
67+
// test files are optimized automatically (type-check-only files are excluded)
68+
const runtimeTestFiles = testFiles.filter(f => !f.endsWith('.test-d.ts'))
6869
expect(vitest.projects.map(p => p.browser?.vite.config.optimizeDeps.entries))
69-
.toEqual(vitest.projects.map(() => expect.arrayContaining(testFiles)))
70+
.toEqual(vitest.projects.map(() => expect.arrayContaining(runtimeTestFiles)))
7071

7172
const testFilesCount = readdirSync('./test')
72-
.filter(n => n.includes('.test.'))
73+
.filter(n => n.includes('.test.') || n.includes('.test-d.'))
7374
.length + 1 // 1 is in-source-test
7475

7576
expect(browserResultJson.testResults).toHaveLength(testFilesCount * instances.length)

0 commit comments

Comments
 (0)