What problem does it solve?
This Skill provides clear guidelines and best practices for writing effective, maintainable, and readable unit tests using the Behavior-Driven Development (BDD) style, ensuring accurate damage detection and well-explained failures.
Core Features & Use Cases
- BDD Structure Enforcement: Mandates the use of
Describe - Context - It for test organization.
- Naming Conventions: Defines clear patterns for naming test blocks in English with Korean descriptions.
- Test Quality Principles: Outlines essential criteria for good unit tests (accuracy, independence, readability, speed).
- Behavior-Driven Testing: Emphasizes testing distinct behaviors rather than just functions.
- Public API Testing: Guides users to test through public interfaces, not private implementation details.
- Test Double Strategies: Provides recommendations on using Mocks, Stubs, and Fakes.
- Assertion Best Practices: Recommends using appropriate matchers for clear failure messages.
- Dependency Injection: Promotes DI for improved testability.
- Use Case: When developing a new authentication module, use this Skill to ensure all login scenarios (valid credentials, invalid credentials, locked accounts) are covered with clear, descriptive BDD tests.
Quick Start
Use the testing-unit skill to write a BDD-style unit test for the UserRegistration class.