Browser and module verification#
Select the pinned toolchain and run pnpm worktree:setup. Linux runners additionally need Chromium's system dependencies:
pnpm exec playwright install --with-deps chromium
Fixtures and browser tests require loopback HTTP only, with no credentials or tracker mutations. Chromium is the foundation verification target, not a product browser-support commitment.
Commands#
| Command | Purpose |
|---|---|
pnpm test:unit | Module-interface and fixture behavior |
pnpm test:browser | Real Chromium journeys on an owned server |
pnpm test:browser testing/journeys/harness.spec.mts | One existing browser journey |
pnpm check:harness | Normal journeys plus a deliberate failure probe, retained diagnostics and process cleanup |
pnpm test:pr-preview | Built preview and examples under deployment subpaths, desktop/mobile |
pnpm test:workflow | Two real Git worktrees, browser isolation, locks and evidence rejection controls |
pnpm verify | Complete repository gate, including all browser/workflow checks |
Build first with pnpm build before checking built previews. Source identity is embedded into built HTML; static browser verification rejects a stale build. The harness uses its own expected-failure run, which must fail for the intended assertion and retain screenshots, video and traces. A probe's failure is not accepted as a passing product result.
The browser helpers bind their own loopback servers with OS-allocated ports, pass the actual URLs to Playwright, and close those exact servers. Invoke the supported scripts rather than raw Playwright: its configuration requires owned URLs and a run directory. Every run has an isolated test-results/workflow/<run-id>/ directory with source/commit identity, server records, browser.json, and browser outputs. Normal journeys retain HTML reports in that run's report/ folder; static tests use list output and per-test failure artifacts. Inspect with pnpm exec playwright show-report <run-directory>/report or pnpm exec playwright show-trace <trace.zip>.
Meaningful checks and evidence#
Use supported module entries as the test surface, checking observable behavior, cleanup, and relevant failures. Keep .test.ts for Vitest and .spec.mts for Playwright journeys; native tooling regressions use .test.mts. Register environments explicitly instead of relaxing strict checks. Node/browser testing declarations have their own environment; portable SDK code remains free of DOM/Node ambient types.
Automated browser verification is required for every change. Add relevant regression journeys when behavior changes, and perform observed T3 preview checks using the actual worktree URL and source identity. Keyboard and relevant viewport coverage apply to interaction/visual changes. For tooling/docs changes retain browser smoke evidence plus direct acceptance checks. Reliable development defines the browser observations and handoff contract.
Parallel worktrees explains owned T3 tabs, origin/storage isolation, worktree-local guards, and interrupted-run recovery. Stop a serving dev command before verification in that worktree; use separate worktrees for simultaneous work.