testing-anti-patterns

Review test suites for mock-behavior testing and production code pollution.

74|6|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/mneves75/dnschat --skill testing-anti-patterns-mneves75
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-anti-patterns
Source: https://github.com/mneves75/dnschat/tree/main/.claude/skills/testing-anti-patterns
Command: npx skills add https://github.com/mneves75/dnschat --skill testing-anti-patterns-mneves75

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Poor testing practices, such as testing mock behavior, adding test-only code to production, or incomplete mocking, lead to brittle tests and unreliable systems that provide false confidence.

Core Features & Use Cases

  • Prevent Mock-Behavior Testing: Ensures tests verify real component behavior, not just mock interactions.
  • Production Code Purity: Prevents the pollution of production classes with methods used only in tests.
  • Informed Mocking: Guides you to understand dependencies fully before mocking, avoiding incomplete or misleading test setups.
  • Use Case: Review an existing test suite for a user-service to identify and refactor tests that assert on mock elements, ensuring they verify actual service logic.

Quick Start

Use the testing-anti-patterns skill to review the user-service.test.ts file for any common testing mistakes, especially regarding mock usage.