Skip to main content

Testing Strategy

Layers:

  • Unit tests (Vitest) for utilities and isolated logic.
  • E2E tests (Playwright) for core flows.
  • Smoke tests (curl) for critical endpoints.

Commands:

# Unit
npm run test

# Watch mode
npm run test:watch

# E2E
npm run test:e2e

CI:

  • .github/workflows/ci.yaml runs lint, typecheck, unit tests, and e2e (headless).
  • Use Pages Preview deployments to validate changes before merging.

Best practices:

  • Prefer deterministic inputs/fixtures; avoid external API dependency in unit tests.
  • Gate releases with e2e coverage for projects CRUD and container provisioning.
  • Add regression tests for bug fixes.