Observal
Observal copied to clipboard
Add pnpm test --coverage for web/ (Vitest)
Background
The web frontend has E2E tests via Playwright but no unit-test coverage tracking. Vitest + React Testing Library is the standard pick.
What needs to be done
- Install Vitest, `@testing-library/react`, and `jsdom` as dev deps.
- Add a `web/vitest.config.ts`.
- Add a minimal sample test under `web/src/components/ui/tests/button.test.tsx` so the pipeline is green.
- Add `pnpm test` and `pnpm test --coverage` scripts in `web/package.json`.
- Wire `pnpm test --coverage` into the `web-lint` CI job in `.github/workflows/ci.yml`.
Files to touch
- `web/package.json`
- `web/vitest.config.ts` (new)
- `web/src/components/ui/tests/button.test.tsx` (new)
- `.github/workflows/ci.yml`
Acceptance criteria
- [ ] `pnpm test` passes locally.
- [ ] `pnpm test --coverage` writes `coverage/`.
- [ ] CI runs the same command on PRs.
/take
@Sumedh-6504 You've been assigned to this issue. Welcome aboard! 🎉
Please read our contributing guide before submitting a PR.