Testing
Every acceptance criterion of a story has an automated test named after the story: us-inv-05.spec.ts or describe("US-INV-05", …).
| Kind | Where | Runs with |
|---|---|---|
| Unit | next to the code, *.test.ts(x) |
Vitest (API, web, shared, @spine/ui), Jest (field app, @spine/ui-native) |
| Integration | apps/api/src/**/*.integration.test.ts |
Vitest against Postgres; each test file gets its own copy of the database |
| End-to-end | apps/e2e/tests |
Playwright against a real API and web app, with axe-core on every route in light and dark mode |
| Accessibility | *.a11y.test.tsx beside each component |
axe in jsdom; every component and route meets WCAG 2.1 AA |
Before a pull request
Section titled “Before a pull request”pnpm lint,pnpm typecheckandpnpm test, plus the API’s integration tests if you changed the API.pnpm verifyruns everything, E2E included. CI doesn’t run E2E on pull requests (only before a release), so say in the pull request which commitpnpm verifypassed on.
The definition of done, and the QA script testers follow before a release, are in 11-testing-release and qa-script.