Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`basic 1`] = `1`;
exports[`basic 1`] = `2`;
7 changes: 4 additions & 3 deletions test/browser/specs/runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ describe('running browser tests', async () => {
expect(events).toContain(`onBrowserInit ${project.name}`)
})

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

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

expect(browserResultJson.testResults).toHaveLength(testFilesCount * instances.length)
Expand Down
Loading