From 84ed9ab5541d4d9486b6155362103af11507a446 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 14 Feb 2026 03:40:58 +0000 Subject: [PATCH] perf(test): auto-unstub globals --- vitest.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 7fc32c5c11..6ff20f192a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -21,6 +21,8 @@ export default defineConfig({ // Many suites rely on `vi.stubEnv(...)` and expect it to be scoped to the test. // This is especially important under `pool=vmForks` where env leaks cross-file. unstubEnvs: true, + // Same rationale as unstubEnvs: avoid cross-test pollution under vmForks. + unstubGlobals: true, pool: "forks", maxWorkers: isCI ? ciWorkers : localWorkers, include: ["src/**/*.test.ts", "extensions/**/*.test.ts", "test/format-error.test.ts"],