principle-test-behavior-not-implementation
FeaturedApply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
Install
Quality Score: 93/100
Skill Content
Details
- Author
- michael-denyer
- Repository
- michael-denyer/pstack-claude
- Created
- 3 months ago
- Last Updated
- 2 days ago
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
testing
How to WRITE real, maintainable tests in any stack — assertions that fail when the code is broken, the test pyramid and AAA structure, behavior-over-implementation, mocking discipline, fixtures, coverage that means something, and the ship gates (test-count-never-decrease, no self-mocking, prove-RED-first). Language-generic with concrete examples in TypeScript/JavaScript, Python, Rust, and Go. Use when asked to "add tests", "write a test", "improve coverage", "fix a flaky test", "how do I test X", when turning a hollow assertion into a real one, deciding what layer a test belongs in, or when a change must not drop test quality. The construction counterpart to the crucible-detective agent's fraud hunt.