testing-anti-patterns

Identify and prevent common testing anti-patterns in JavaScript/TypeScript projects.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/Khoiwall/be_vidify --skill testing-anti-patterns-khoiwall
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-anti-patterns
Source: https://github.com/Khoiwall/be_vidify/tree/main/.opencode/skill/testing-anti-patterns
Command: npx skills add https://github.com/Khoiwall/be_vidify --skill testing-anti-patterns-khoiwall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests often drift into anti-patterns that mask real failures and pollute production with test-only constructs. This Skill helps teams identify and dismantle common anti-patterns in testing to ensure tests verify real behavior and maintain separation of concerns.

Core Features & Use Cases

  • Enforces never test mock behavior and avoid test-only production methods.
  • Guides on proper mocking scope, complete mocks, and avoiding over-mocking.
  • Supports adoption of TDD discipline and robust integration tests.

Quick Start

Review the anti-pattern guidelines before writing or updating tests to ensure you avoid common pitfalls.

Frequently Asked Questions about testing-anti-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are common testing anti-patterns that mask real failures?▼

Testing anti-patterns include testing mock behavior instead of real logic, over-mocking dependencies, using incomplete mocks, and contaminating production code with test-only methods. These practices mask real failures and pollute production with test constructs.

How do I prevent test-only production methods in my codebase?▼

To prevent test-only production methods, maintain strict separation of concerns and never add code to production modules solely for test access. Reviewing anti-pattern guidelines before writing tests ensures you avoid these structural contaminations.

Does this testing guidance apply to JavaScript and TypeScript projects?▼

Yes, this testing guidance explicitly applies to unit, integration, and end-to-end tests across JavaScript and TypeScript projects, enforcing clear testing discipline through guidelines, guardrails, and examples shown in the Markdown handbook.

How do I determine the proper scope for mocking in unit tests?▼

Determining proper mocking scope requires avoiding over-mocking and ensuring mocks are complete. Following established testing guardrails helps you verify real behavior rather than just testing the mocks themselves during unit test development.

When should I not use mocks during test development?▼

You should not use mocks when it causes you to test mock behavior rather than real application logic, or when mocking forces you to create incomplete mocks. Avoid over-mocking to ensure tests verify actual behavior and maintain separation of concerns.

How do I adopt TDD discipline while avoiding anti-patterns?▼

To adopt TDD discipline while avoiding anti-patterns, review guidelines for proper mocking scope and complete mocks before writing tests. This ensures your test-driven development verifies real behavior without contaminating production code with test-only constructs.