Skip to content

Commit 6875fad

Browse files
committed
test: exclude e2e/ Playwright specs from the vitest unit run
vitest's default include glob picked up e2e/*.spec.js and crashed trying to collect Playwright's test() as a vitest test. Unit and e2e suites run through separate commands (npm test vs npm run test:e2e).
1 parent d2461ee commit 6875fad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

vitest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ export default defineConfig({
55
// jsdom, not the vitest default "node" environment, since main.js and
66
// future UI code touch the DOM directly (no framework abstracting it).
77
environment: "jsdom",
8+
// e2e/ holds Playwright specs, run separately via `npm run test:e2e` —
9+
// vitest's default include glob would otherwise try (and fail) to
10+
// collect them as unit tests.
11+
exclude: ["**/node_modules/**", "e2e/**"],
812
},
913
});

0 commit comments

Comments
 (0)