Tools
Tools
Automated testing
Unit, component, e2e, and accessibility automation for the design system. Run locally in CI — and try axe live on the lab below.
One-command suite
npm run test runs unit tests, then e2e route smoke against the running preview (or BASE_URL). Use npm run test:a11y for axe scans.Vitest
Unit & component tests
cn(), hooks, Button, registry contracts
npm run test:unitTesting Library
DOM assertions
roles, labels, disabled state
used by Vitestaxe-core
Accessibility engine
WCAG rule violations in the browser
npm run test:a11yPlaywright
E2E smoke + axe runner
Critical routes load with content, no page errors
npm run test:e2eTypecheck
Static types
Route and component type safety
npm run typecheckCommands
package.json scripts
Scripts live in package.json. Scanners: scripts/e2e-routes.mjs, scripts/a11y-scan.mjs.
Critical routes
E2E smoke hits these paths. Expand the list in src/lib/testing.ts.
Example unit test
Button accessibility contract
See src/components/ui/button.test.tsx and src/lib/utils.test.ts.
Live axe lab
Runs axe-core in the browser against the sample panel. Intentional issues can be toggled for demos — fix them and re-scan.
Sample UI under test
Good pattern: labeled inputs, named icon button, semantic buttons.
CI recipe
npm run typechecknpm run test:unit- Start the app (dev or preview)
npm run test:e2eandnpm run test:a11y