Test Driven Development

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

archieindian Updated 75 repo stars

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 commit e0c0df5224

Frequently asked questions

npx get-skill add archieindian/test-driven-development