standards-testing

Review test files to prevent pollution and verify real behavior.

1.8k|153|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/maxritter/claude-pilot --skill standards-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: standards-testing
Source: https://github.com/maxritter/claude-pilot/tree/main/pilot/skills/standards-testing
Command: npx skills add https://github.com/maxritter/claude-pilot --skill standards-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents production code pollution by ensuring tests verify real behavior rather than testing mocks or test-only tactics, and it guides best practices for mock usage and test data structures.

Core Features & Use Cases

  • Enforces testing best practices: avoid asserting on mock existence, prevents production code pollution with test-only methods, and promotes complete mock data structures.
  • Provides guidance for code reviews and refactoring to maintain test quality across projects.
  • Improves confidence by focusing tests on real behavior and integration readiness.

Quick Start

Use standards-testing guidelines to review a failing test and convert it to a robust real-behavior test.

Frequently Asked Questions about standards-testing

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

FAQPage Schema
How do I prevent production code pollution when writing unit tests?

To prevent production code pollution, you should focus tests on real behavior rather than mocks, avoid asserting on mock existence, and stop creating test-only methods in production code to maintain production code purity.

What is the best way to structure mock data for integration tests?

The best way to structure mock data is to ensure your mock data structures are complete and accurate, which improves confidence by focusing tests on real behavior and integration readiness across different frameworks.

Does this testing standard work with Jest, Vitest, and Pytest?

Yes, these testing standards apply to creating and reviewing test files across multiple frameworks including Jest, Vitest, Pytest, RSpec, Go testing, and JUnit, covering mocking strategies and test utilities.

How do I convert a failing test to a robust real-behavior test?

You convert a failing test by applying testing guidelines to review it, removing test-only tactics, avoiding mocks, and refocusing assertions on real behavior to achieve a robust real-behavior test.

Why should I avoid asserting on mock existence in TDD workflows?

You should avoid asserting on mock existence because it causes test pollution by verifying the mock itself rather than the actual behavior, reducing confidence in integration readiness and overall code quality.