tdd

Installation
SKILL.md

Test-Driven Development

TDD is a design practice as much as a testing practice. Tests written before implementation force the interface to be designed from the caller's perspective. Painful test setup signals a design problem — too many dependencies, responsibilities, or the wrong abstraction boundary. Let the tests tell you.


Schools

Two schools differ on what constitutes a "unit" and where to draw the mock boundary.

London school (default here): A unit is a single class or function. Double all collaborators at module boundaries. Preferred for new code — drives interface design and keeps feedback fast.

Chicago school: A unit is a cluster of related objects. Wire real collaborators; only double external infrastructure (databases, HTTP, clocks). Preferred when retrofitting tests onto existing code with stable internal structure.

Both are valid. The choice determines where doubles live, not whether you test.


Red-Green-Refactor

Related skills
Installs
3
First Seen
13 days ago