Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

test: isolate test files to stop cross-file mock leakage

Amruth Pillaie8508e6d038b
diff --git a/vitest.shared.ts b/vitest.shared.ts
index ce9ddaa1b..59557283e 100644
--- a/vitest.shared.ts
+++ b/vitest.shared.ts
@@ -44,7 +44,9 @@ export const createVitestProjectConfig = ({
include: ["src/**/*.{test,spec}.?(c|m)[jt]s?(x)"],
exclude: ["node_modules", "dist", ".output", "coverage", "reports"],
pool: "threads",
- isolate: false,
+ // Isolation stays on: without it, test files in a worker share one module registry, so a
+ // `vi.mock` in one file leaks into another and whichever file imported a module first wins.
+ // That made every suite mocking `@reactive-resume/env/server` order-dependent and flaky.
passWithNoTests: true,
coverage: {
provider: "v8",