What problem does it solve?
Inconsistent or poorly implemented Test-Driven Development leads to brittle tests, false positives, and wasted development time, reducing the value of testing as a design and safety tool. This Skill provides standardized, language-agnostic TDD practices to help developers write effective tests that drive better design and catch real bugs.
Core Features & Use Cases
- Strict Red-Green-Refactor Guidance: Clear rules for each phase of the TDD cycle to avoid common pitfalls like premature generalization or testing implementation details.
- Precise Test Double Taxonomy: Clear definitions and usage rules for dummies, stubs, spies, mocks, and fakes to prevent over-mocking and keep tests resilient to refactoring.
- Testing Pyramid & Quality Checks: Best practices for unit, integration, and E2E test distribution, plus mutation testing guidance and test smell detection to ensure test suites are fast, reliable, and meaningful.
- TDD School Selection: Practical guidance for choosing between Outside-In (London) and Inside-Out (Detroit) TDD based on project context, plus proven patterns for bug fix regression testing.
- Use Case: A developer building a new payment processing feature can use this Skill to write a failing test first, select the correct test double for the payment gateway collaborator, and validate their test suite catches boundary errors via mutation testing.
Quick Start
Use the tdd-mastery skill to write a failing test for your new user authentication feature before writing any production code.