| Unit | Vitest | Parsers against real fixtures, layer resolution, stat calculations, API key hashing. 90% line floor.The alert detail schemas; the daily job’s step order and failure handling; the cron route’s secret check; bot and link-preview classification of user agents; tracked-link token generation and lookup; admin sign-in: the sign-in action’s one neutral answer, the sign-in link’s confirm route, the owner allowlist check, and the guard every admin page and action calls first. |
| Contract | Vitest | The shared GitHub Action every project reports through, run against a local server. Runs in the unit job; counted as Unit. |
| Component | VitestTesting Library | Each component built from the design, rendered in jsdom: its words, states and links, and its stylesheet against the design’s values. |
| Integration | Vitestlocal Supabase | The ingestion endpoint end to end against local Supabase: idempotent retries, transactions and rollups, and row-level security checked with the anonymous client, so private projects stay hidden.The alert rules (stale, count drop, empty report, below floor), which are SQL, against local Supabase with captured fixtures. The daily job against local Supabase: heartbeat, opening stale alerts, and pruning results at 180 days and visits and tracked sessions at 365. Visit recording, with bots and previews kept out of every count and no raw IP address stored in visits or tracked sessions. Admin sign-in and its actions (create, acknowledge, rotate, delete) against local Supabase Auth with a real session, each refused without one. |
| E2E | Playwright | A seeded database behind the landing, project, run and test-history pages; visibility rules in the rendered UI; every public page again with JavaScript turned off.The tracked-link flow: open a link, check its cookie and redirect, see the lead project first, and find the visits stored against the link; nothing the visitor sees names the company, role, contact or token. Admin sign-in with the email opened from a local mail catcher, a spent or made-up link and another address. Admin’s sections with seeded links and visits, each action, and every action refused once the session has gone. The run page’s pruned-results notice, after a real prune. |
| Accessibility | axePlaywrightcontrast script | axe on every public page, counted with E2E. A script in the unit job checks the contrast of the design’s token pairs in both themes. |
| Visual | Playwright | Snapshots of each page at desktop and phone widths, light and dark, compared inside a pinned container image so rendering can’t drift. Counted with E2E. |
| Leak sweep | Playwright | Walks every page that can show a private project as a visitor and fails if any private project’s failure text, stack trace or source link appears anywhere. Counted with E2E.Also checks that admin without a session shows only the sign-in form and nothing hidden. |