testing-strategy

Installation
SKILL.md

Testing Strategy

Writes focused, maintainable tests and (if needed) sets up the test tooling.

What to test (priorities)

  1. Business logic — pure functions, validators, calculations, state reducers, server actions. Highest value.
  2. Critical paths — auth flows, payments, data mutations, error handling.
  3. Edge cases — boundaries, empty/undefined inputs, error responses.
  4. UI interactions (Testing Library) — behavior users care about (submit, render data, error state), NOT implementation details (no testing internal state or class names unless meaningful).

Don't test: framework internals, library behavior, generated code, or implementation details you'd have to rewrite on refactor.

Setup (if missing)

  • Vitest (or match existing runner — Jest, node:test).
  • React components: @testing-library/react + @testing-library/jest-dom.
  • test script in package.json; optional coverage script.
Installs
1
First Seen
Sep 5, 2026