fix(frontend): exclude nested node_modules from the vitest run (#217)

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
This commit is contained in:
Khushi Diwan 2026-06-15 14:51:03 +05:30 committed by GitHub
parent 9e84a3b5ae
commit d747b57ca6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -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",
},