What problem does it solve?
Developers often write code before tests, leading to tests that don't truly verify behavior, missed edge cases, and increased debugging time. This skill enforces the Test-Driven Development (TDD) cycle, ensuring every piece of production code is backed by a failing test first, guaranteeing higher quality and fewer bugs.
Core Features & Use Cases
- Red-Green-Refactor Cycle: Systematically write failing tests, then minimal code to pass, and finally refactor.
- Behavior-Driven Testing: Focus on desired behavior, not just implementation details, to create meaningful tests.
- Bug Fix Integration: Address bugs by first writing a failing test that reproduces the issue, then fixing it.
- Use Case: You're implementing a new user authentication feature. Use this skill to write a test that fails when an empty email is submitted, then write the minimal code to make that test pass, and finally refactor for clarity.
Quick Start
You are about to implement a new function. Use this skill to guide you through writing a failing test for a specific behavior, verifying its failure, and then writing the minimal code to make it pass.