From 56961a261b6310e2b42b3ed26275fcd88c6ab952 Mon Sep 17 00:00:00 2001 From: Joseph Mearman Date: Mon, 14 Sep 2026 08:13:11 +0100 Subject: [PATCH] fix(core): exclude .stryker-tmp from vitest test discovery vitest's default test-file glob picked up Playwright's own e2e suite inside Stryker's instrumented sandbox copies under .stryker-tmp/ sandbox-*/, since the existing e2e exclude pattern only matches the real src/ path, not this prefixed one. Running pnpm test (e.g. via the pre-push hook) while a mutation run's sandbox exists on disk therefore failed on test.describe() being called outside a Playwright config. Matches the same exclusion eslint.config.ts and stryker. config.ts's own ignorePatterns already carry. --- vitest.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index d6ca0a4..cf85ced 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -16,6 +16,8 @@ export default defineConfig({ "**/dist/**", // Playwright's own e2e suite lives under src/bridges/user/web/e2e and is driven by `pnpm test:e2e`, not vitest -- its *.e2e.test.ts files would otherwise also match vitest's default **/*.test.ts discovery glob. "src/bridges/user/web/e2e/**", + // Stryker's own instrumented sandbox copies of the source (each mutant gets a full copy under .stryker-tmp/sandbox-*/), including its own nested copy of the e2e suite above -- the exclude pattern for that suite only matches the real src/ path, not this prefixed one, so running `pnpm test` (e.g. via the pre-push hook) while a mutation run's sandbox exists on disk picks up Playwright's own e2e tests and fails on `test.describe()` being called outside a Playwright config. Matches the same exclusion eslint.config.ts's `ignores` and stryker.config.ts's own `ignorePatterns` already carry, for the identical reason. + ".stryker-tmp/**", ], }, });