[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

test: update browser test for `cdp.test-d.ts` (#9804)

authored by

Hiroshi Ogawa and committed by
GitHub
(Mar 6, 2026, 2:39 PM +0900) dfb2159d 0c2c0136

+5 -4
+1 -1
test/browser/fixtures/update-snapshot/__snapshots__/basic.test.ts.snap
··· 1 1 // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 2 3 - exports[`basic 1`] = `1`; 3 + exports[`basic 1`] = `2`;
+4 -3
test/browser/specs/runner.test.ts
··· 64 64 expect(events).toContain(`onBrowserInit ${project.name}`) 65 65 }) 66 66 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')) 68 69 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))) 70 71 71 72 const testFilesCount = readdirSync('./test') 72 - .filter(n => n.includes('.test.')) 73 + .filter(n => n.includes('.test.') || n.includes('.test-d.')) 73 74 .length + 1 // 1 is in-source-test 74 75 75 76 expect(browserResultJson.testResults).toHaveLength(testFilesCount * instances.length)