Skip to content

Commit 44637a4

Browse files
committed
fix(test): exclude e2e/ from vitest's default test glob
Vitest's default include pattern matches any *.spec.ts, so it was picking up the new Playwright specs and failing on their test() fixture API. Caught by CI on the e2e scaffolding PR.
1 parent fadf329 commit 44637a4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

vitest.config.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'node:path';
22

3-
import { defineConfig } from 'vitest/config';
3+
import { configDefaults, defineConfig } from 'vitest/config';
44

55
export default defineConfig({
66
resolve: {
@@ -10,5 +10,8 @@ export default defineConfig({
1010
test: {
1111
globals: true,
1212
environment: 'node',
13+
// Playwright owns e2e/*.spec.ts; vitest's default glob would otherwise
14+
// pick them up and fail on the Playwright-only `test()` fixture API.
15+
exclude: [...configDefaults.exclude, 'e2e/**'],
1316
},
1417
});

0 commit comments

Comments
 (0)