type: decision
status: active
timestamp: 2026-06-20
tags: [decisions, architecture, testing, vitest, playwright, storybook, chromatic]

Testing — three-layer stack (Vitest unit + Playwright E2E + Storybook+Chromatic visual)

Three-layer testing: Vitest, Playwright, Chromatic per PR' against Storybook in parallel. PR fails on any failure in any layer. All free, no card.

Testing — three-layer stack (Vitest unit + Playwright E2E + Storybook+Chromatic visual)

Decision

Every site’s and every package’s per-PR CI runs three layers of tests in parallel after the Cloudflare Pages preview deploy lands:

  1. Unit / integrationVitest. Fast, in-memory, Vite-native; runs every *.test.ts file.
  2. End-to-endPlaywright. Real browser (Chromium + WebKit + Firefox) against the preview URL. Already the substrate the a11y axe-core suite rides on.
  3. Visual regressionStorybook + Chromatic. Storybook declares canonical states; Chromatic diffs them against the baseline branch.

PR fails on any failure in any layer. All three layers are free, no card. The visual-regression layer requires explicit human acceptance of any declared diff.

Why

Implications

Architecture

Coupling to existing stacks

Per-PR gating

What we don’t do

Cross-refs


Edit on GitHub · Back to index