Testing Anti-Patterns
Installation
SKILL.md
Testing Anti-Patterns
Overview
Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested.
Core principle: Test what the code does, not what the mocks do.
Following strict TDD prevents these anti-patterns. See the Test-Driven Development skill (available in the skill library) for the complete TDD workflow.
When to Use This Skill
Activate this skill when:
- Writing or changing tests - Verify tests cover real behavior
- Adding mocks - Ensure mocking is necessary and correct
- Reviewing test failures - Check if mock behavior is the issue
- Tempted to add test-only methods - STOP and reconsider
- Tests feel overly complex - Sign of over-mocking