The frontend has no test suite. Adding test infrastructure now — with one passing example test — unblocks all future test contributions and gives us something to gate CI on down the road.
What to do
- Add
vitest, @testing-library/react, @testing-library/jest-dom, and happy-dom (or jsdom) to frontend/package.json as devDependencies
- Create
frontend/vitest.config.ts that reuses the path aliases from vite.config.ts
- Add an
npm test script (and npm run test:watch)
- Write one example test against a simple leaf component — suggestion: a Radix-wrapped UI primitive from
frontend/src/components/ui/, or one of the smaller display components. Render it, assert something obvious (text content, a class, a callback firing)
- Update the README "Testing" section to mention
npm test
Acceptance criteria
Why this matters
Once this lands, every future PR can add a test in 5 minutes. Right now nobody can, because there's no infrastructure. This is the kind of foundational change that compounds.
Scope
Touches 4–5 files. Estimated time: 1-2 hours.
Want to take this on? Comment below and I'll assign it to you.
The frontend has no test suite. Adding test infrastructure now — with one passing example test — unblocks all future test contributions and gives us something to gate CI on down the road.
What to do
vitest,@testing-library/react,@testing-library/jest-dom, andhappy-dom(orjsdom) tofrontend/package.jsonas devDependenciesfrontend/vitest.config.tsthat reuses the path aliases fromvite.config.tsnpm testscript (andnpm run test:watch)frontend/src/components/ui/, or one of the smaller display components. Render it, assert something obvious (text content, a class, a callback firing)npm testAcceptance criteria
cd frontend && npm testruns and the one test passescd frontend && npm run buildstill works after the changes (no type regressions)Button.test.tsx) or undersrc/__tests__/— your callWhy this matters
Once this lands, every future PR can add a test in 5 minutes. Right now nobody can, because there's no infrastructure. This is the kind of foundational change that compounds.
Scope
Touches 4–5 files. Estimated time: 1-2 hours.
Want to take this on? Comment below and I'll assign it to you.