Problem
vitest.config.ts:6-7 sets environment: "node" and include: ["src/**/*.test.ts"]. Two consequences:
- Every hook (
use-local-storage, use-debounced-value, use-contributors) and component is structurally untestable — no jsdom, no Testing Library.
- The
.ts-only glob is a trap: a contributor who adds a .test.tsx gets a green run that silently never executed their file.
The pure src/lib logic is well covered (86 tests) — this is specifically about the UI half of the codebase.
Proposed solution
- Split Vitest into projects (or use
environmentMatchGlobs): node for src/lib, jsdom for hooks/components.
- Add
jsdom + @testing-library/react as devDependencies.
- Broaden the include to
src/**/*.test.{ts,tsx}.
- Land one seed test (e.g.
use-debounced-value with fake timers) proving the pipeline.
Acceptance criteria
Problem
vitest.config.ts:6-7setsenvironment: "node"andinclude: ["src/**/*.test.ts"]. Two consequences:use-local-storage,use-debounced-value,use-contributors) and component is structurally untestable — no jsdom, no Testing Library..ts-only glob is a trap: a contributor who adds a.test.tsxgets a green run that silently never executed their file.The pure
src/liblogic is well covered (86 tests) — this is specifically about the UI half of the codebase.Proposed solution
environmentMatchGlobs):nodeforsrc/lib,jsdomfor hooks/components.jsdom+@testing-library/reactas devDependencies.src/**/*.test.{ts,tsx}.use-debounced-valuewith fake timers) proving the pipeline.Acceptance criteria
.test.tsxfile actually runs.