Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Teaches agents to test real behavior over mocks, keep test-only methods out of production code, and mock with dependency understanding.
67% 96%+29 ptsof test cases passed
Passed 23 of 24 test cases with the skill, and 16 of 24 without it.
Before adding a method to a TypeScript production class during development, what two questions must be asked to ensure test pollution does not occur?
Requires asking if the production class owns the resource lifecycle
3 of 3 safety checks passed
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:
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.