Skip to content

Testing rules ​

  • Test observable behavior and public contracts, not private implementation shape.
  • Use Vitest for framework-neutral and unit behavior, Vue Test Utils when a component needs Vue-aware mounting, and Playwright for browser behavior.
  • Add keyboard, focus, disabled, error, async, cleanup, and accessibility cases identified by the component specification.
  • Automated axe checks supplement rather than replace semantic and manual accessibility reasoning.
  • Add compile-time tests once a public generic or inference contract needs protection.
  • A bug fix should include a failing regression test whenever practical.
  • Keep fixtures minimal and name the behavior they establish.

Local checks and CI ​

  • Run focused checks before pushing. For docs, check formatting and any links or generated content the diff touches. For code, lint affected files, run the Vitest or Playwright cases that cover the change, and typecheck the affected package when TypeScript contracts change.
  • Record the commands, results, and current CI status in the PR. Push a coherent draft after focused validation so CI can start while review proceeds.
  • CI runs full repository verification and browser checks for the PR's scope. Require green GitHub verify and browser checks before merging. Run full local pnpm verify for cross-stage diagnosis or when explicitly requested.
  • pnpm docs:build, which pnpm test:e2e runs first, raises Node's heap to at least 4 GiB because the default on a small machine is too low for the docs bundle. If it still runs out of memory, set a larger size for that run, for example NODE_OPTIONS=--max-old-space-size=6144 pnpm docs:build. A size set in NODE_OPTIONS always wins.
  • A test in another file can still catch a regression introduced by the diff. For a suspected baseline failure, reuse a master CI result or a linked issue or PR that records the same check and diagnostic on the affected platform. Check that the relevant code and dependencies still match. If the cause is unclear, reproduce the smallest failing check on the branch and origin/master. Record the base commit, platform, command, and diagnostic in the PR so later contributors can reuse the result.

The canonical rationale and test placement are in testing standards.