From 4747bc5d3a4e847aab7334dc4e0f33f8a8579abe Mon Sep 17 00:00:00 2001 From: codebanditssss Date: Sat, 13 Jun 2026 02:00:02 +0530 Subject: [PATCH] fix(frontend): exclude nested node_modules from the vitest run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bare "node_modules/**" replaces vitest's default "**/node_modules/**" and only matches the repo root, so the tracked src/landing preview app's nested node_modules had its vendored third-party test suites (zod, next, ...) collected and run once those deps were installed — 20+ failures from code that isn't ours. Anchor it at any depth with "**/node_modules/**". Closes #216 --- frontend/vite.renderer.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/vite.renderer.config.ts b/frontend/vite.renderer.config.ts index d5ede349..6aa56328 100644 --- a/frontend/vite.renderer.config.ts +++ b/frontend/vite.renderer.config.ts @@ -74,7 +74,11 @@ export default defineConfig({ ], test: { environment: "jsdom", - exclude: ["node_modules/**", "dist/**", "dist-electron/**", "e2e/**"], + // Anchor node_modules at any depth: a bare "node_modules/**" replaces + // vitest's default "**/node_modules/**" and only matches the root, so the + // tracked src/landing preview app's nested node_modules would otherwise + // have its vendored third-party test suites collected and run. + exclude: ["**/node_modules/**", "dist/**", "dist-electron/**", "e2e/**"], globals: true, setupFiles: "./src/renderer/test/setup.ts", },