Observal icon indicating copy to clipboard operation
Observal copied to clipboard

Add pnpm test --coverage for web/ (Vitest)

Open Apoorvgarg-creator opened this issue 6 months ago • 2 comments

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.

Apoorvgarg-creator avatar May 11 '26 12:05 Apoorvgarg-creator

/take

Sumedh-6504 avatar May 31 '26 15:05 Sumedh-6504

@Sumedh-6504 You've been assigned to this issue. Welcome aboard! 🎉

Please read our contributing guide before submitting a PR.

github-actions[bot] avatar May 31 '26 15:05 github-actions[bot]