mirror of
https://github.com/tiennm99/bsk.git
synced 2026-08-03 16:21:56 +00:00
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.