testing
Installation
SKILL.md
Testing
This skill provides guidance on testing philosophy and practices, emphasizing tests as specifications and API design through TDD.
Core Philosophy
Tests as Executable Specifications
Tests are not just verification tools — they are executable specifications that document how the system should behave. A well-written test suite serves as living documentation.
Tests as API Consumers
Tests are the first users of your code's APIs. This is why TDD is valuable: you design the API by thinking about the consumer first, before thinking about implementation.
When writing tests:
- Consider what interface would be most convenient for the caller
- Let the test drive the API design
- If the test is awkward to write, the API is awkward to use