ShipVeryFastShipVeryFast
Documentation

Testing overview

ShipVeryFast ships with testing wired in across three layers: unit tests and integration tests on Jest, and end-to-end tests on Playwright. This page explains how the three layers fit together; the dedicated pages cover each one in depth.

The three layers

Each layer answers a different question, so they complement rather than overlap:

  • Unit (Jest + React Testing Library): individual functions, hooks and components in isolation, with external services mocked. Fast, run on every save.
  • Integration (Jest + MSW): several units working together, such as an API route with its validation, with network calls mocked at the boundary.
  • End-to-end (Playwright): a real browser driving the running app through full journeys, including automated accessibility checks.

Commands

npm run test                 # all unit tests
npm run test:watch           # watch mode
npm run test:coverage        # unit + integration coverage
npm run test:integration     # integration tests only
npm run test:e2e             # full Playwright suite
npm run test:e2e:headed      # with a visible browser

Coverage targets

The suite aims for 80% overall coverage, rising to 85% for libs/ and 90% for models/. Coverage is reported by the test:coverage scripts and is the natural ratchet to keep green as you add features.

Where to go next