What problem does it solve?
This Skill helps developers to apply test-driven development practices, ensuring high code quality and maintainability.
Core Features & Use Cases
- Test-Driven Development Philosophy: Provides guidance on writing good tests and avoiding common pitfalls.
- Anti-Patterns: Warns against 'horizontal slicing' and other ineffective testing approaches.
- Workflow: Outlines the TDD workflow including planning, tracer bullets, and incremental loop.
- Checklist: Offers a checklist for each cycle to ensure effective test coverage.
- Deep Modules: Discusses the design principle of small interfaces with deep implementations.
- Interface Design: Provides best practices for designing interfaces that are easy to test.
- Mocking Guidelines: Explains when and how to use mocks for external dependencies.
- Refactoring: Suggests refactoring candidates after the TDD cycle.
Quick Start
Start the TDD workflow by first confirming the required interface changes and behaviors to test with the user. Then, write a single test that confirms one behavior about the system, ensuring it fails (RED), and then write minimal code to pass the test (GREEN).