fix(frontend): exclude nested node_modules from the vitest run#217
fix(frontend): exclude nested node_modules from the vitest run#217codebanditssss wants to merge 1 commit into
Conversation
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
Greptile SummaryFixes a vitest misconfiguration where the test
Confidence Score: 5/5Safe to merge — single-line glob fix in test config with no impact on build or runtime behaviour. The change is a one-line correction to a glob pattern in the vitest exclude list. It aligns the project's explicit pattern with vitest's own default, is fully explained in the added comment and PR description, and the before/after test counts confirm the intended effect. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(frontend): exclude nested node_modul..." | Re-trigger Greptile |
Closes #216.
Problem
frontend/vite.renderer.config.tssettest.excludeto["node_modules/**", ...]. Providingexcludereplaces vitest's default**/node_modules/**(it doesn't merge), and the root-anchorednode_modules/**doesn't match nestednode_modules.src/landingis a tracked, self-contained Next.js preview app with its own deps, so once those are installed,npm testcollected and ran vendored third-party suites (zod, next, react-medium-image-zoom, style-to-js) → 20+ failures from code that isn't ours.Change
"node_modules/**"→"**/node_modules/**"so nestednode_modulesare excluded at any depth.Test
npm testcollected 185 files / 2033 tests with 8 failed files / 20 failed tests, all undersrc/landing/node_modules/**.npm testcollects only the renderer's 10 files / 121 tests, all passing, with zerosrc/landing/node_modulesreferences — and runs in ~6s instead of ~50s.