unit-testing

Installation
SKILL.md

Unit testing

A test earns its place by failing when something breaks and staying quiet otherwise. A test that never fails is documentation with a runtime cost; a test that fails on every refactor is a tax. Both get deleted eventually, and the second one takes the good tests' credibility with it.

Coverage is not the goal. Coverage measures which lines ran, not whether anything was checked — a suite that executes everything and asserts nothing scores beautifully and catches nothing.

1. Decide what deserves a test

In descending order of value:

  1. Logic with branches — conditionals, loops, calculations, parsing, state transitions
  2. Anything that has broken before — bugs cluster; a fixed bug without a test will return
  3. Boundaries — where data is validated, converted, or crosses a system edge
  4. Contracts other code relies on — a public API's shape and its documented failure modes
Installs
4
GitHub Stars
1
First Seen
9 days ago
unit-testing — arjunprabhulal/agent-skills