testing-anti-patterns

Installation
SKILL.md

Testing Anti-Patterns

Overview

Tests must verify real behaviour, not mock behaviour. 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.

The Iron Laws

1. NEVER test mock behaviour
2. NEVER add test-only methods to production classes
3. NEVER mock without understanding dependencies

Anti-Pattern 1: Testing Mock Behaviour

Related skills
Installs
27
GitHub Stars
131
First Seen
Jan 30, 2026