What problem does it solve?
Test-driven development prevents ambiguous or partially validated changes by forcing behavior to be specified up front, so bugs are caught early and refactors don’t silently break functionality.
Core Features & Use Cases
- Red-Green-Refactor Loop: Write a failing test, implement the minimal code to pass, then refactor while preserving behavior.
- Test Layering (Unit, Integration, E2E): Structure verification from isolated functions to full user flows to maximize fault isolation and confidence.
- Mocking & Coverage Discipline: Use deterministic mocks/spies and target coverage (e.g., >80%) to reduce flakiness and ensure critical paths are exercised.
- Test Maintenance Practices: Keep tests independent, behavior-focused, and aligned with fixtures and CI so they remain trustworthy over time.
Quick Start
Activate the tdd-workflow skill to design a Red-Green-Refactor plan for adding a new API endpoint, including the unit, integration, and E2E tests plus the mocking and coverage expectations.