Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Drives feature, bug-fix, and behavior changes test-first with red-green-refactor, Tidy First separation, and a Canon test list.
73% 86%+14 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
Not used yet
Load this reference when: writing or changing tests, adding mocks, or tempted to add test-only methods to production code.
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.
1. NEVER test mock behavior
2. NEVER add test-only methods to production classes
3. NEVER mock without understanding dependencies
The violation:
// ❌ BAD: Testing that the mock exists
test('renders sidebar', () => {
render(<Page />);
expect(screen.getByTestId('sidebar-mock')).toBeInTheDocument();
});
Why this is wrong:
your human partner's correction: "Are we testing the behavior of a mock?"
The fix:
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.