Files
bsk/tests/unit
tiennm99 5ddf11ac4a test: add Vitest unit + Playwright E2E suites (PLAN §7)
The repo had zero tests despite PLAN §7 mandating them.

- 97 unit tests over the pure logic: checkup/customer/catalog/template Zod
  schemas, parseNum, computeAge, and invoice math
- extracted lib/billing/totals.ts (sumLineTotals/formatVnd) so invoice math is
  testable, and refactored the invoice route + dashboard to use it
- 16 Playwright smoke tests that need no database: auth gates redirect to
  sign-in, VI-default rendering, password-reveal toggle, /en locale, 404
- playwright.config passes placeholder env inline via webServer.env so no
  env file is ever needed; pnpm test wired into CI (E2E stays local)

tests/e2e/README.md documents the seeded-data prerequisites for the full
queue -> checkup -> prescription -> paid -> invoice happy path, which is
blocked on a provisioned Supabase project rather than faked with skipped tests.
2026-07-25 15:16:48 +07:00
..