Test Driven Development

Red-green-refactor discipline. Use when writing new functionality.

archieindian e0c0df5 503 B Updated

File contents

Test-Driven Development

The Cycle

Red

Write a test that describes the behavior you want. Run it. It should fail.

Green

Write the minimum code to make the test pass.

Refactor

Make the code good. Tests must still pass.

Test Quality

A good test:

  • Tests behavior, not implementation
  • Has one clear assertion
  • Has a descriptive name
  • Is independent
  • Is fast

archieindian/openclaw-superpowers/tree/main/skills/core/test-driven-development commit e0c0df5224

Frequently asked questions

npx skillmds@latest add archieindian/test-driven-development