Testing Standards

Installation
SKILL.md

Testing Standards

Rule: Test real behavior, not mock behavior. Never pollute production code with test-only methods.

When to use this skill

  • When writing new test files or test cases in any testing framework (Jest, Vitest, pytest, RSpec, Go testing, JUnit)
  • When modifying existing tests that use mocks, stubs, spies, or test doubles
  • When considering whether to add a method or property to a production class that would only be used in tests
  • When test setup involves creating mock objects or configuring mock behavior
  • When deciding between testing with real dependencies versus mocked dependencies
  • When tests are failing and you need to determine if the issue is in the code or in how mocks are configured
  • When implementing fixtures, test data builders, or test utilities
  • During test code reviews to ensure testing best practices are followed
  • When test files contain assertions that check for mock existence (e.g., expect(screen.getByTestId('component-mock')))
  • When refactoring production code and tests need to be updated accordingly
  • When choosing isolation strategies for unit tests versus integration tests

Core Principles

Related skills

More from maxritter/claude-codepro

Installs
GitHub Stars
1.6K
First Seen