Favicon of testing-anti-patterns

testing-anti-patterns Skill

AI Agent SkillTypeScriptOpen source

Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies Published by microsoft in FluidFramework.

What is testing-anti-patterns Skill?

Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies Published by microsoft in FluidFramework. This profile combines repository metadata with install, compatibility, and usage signals so developers can quickly decide whether it fits their agent workflow before opening the source repository.

Trust signal
95/100
Maintenance signal
90/100
Adoption signal
92/100

Automated repository signals based on public metadata such as recency, license, installation evidence, and adoption. These are not a security audit or endorsement.

Key capabilities

  • Includes SKILL.md support
  • Reusable instructions support
  • Testing
  • Writing
  • Testing use cases
  • Writing use cases

Technical details

Copy skill directory
  • Install or run with Copy skill directory

When to use testing-anti-patterns Skill

  • Use it for testing.
  • Use it for writing.

Built with

TypeScriptCopy skill directory

Editorial notes

Source

  • Creator: microsoft
  • Repository: microsoft/FluidFramework
  • Skill file: .agency/plugins/nori/skills/testing-anti-patterns/SKILL.md

What it does

Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

Skill instructions

Testing Anti-Patterns Overview 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. The Iron Laws 1. NEVER test mock behavior 2. NEVER add test-only methods to production classes 3. NEVER mock without understanding dependencies Anti-Pattern 1: Testing Mock Behavior The violation: typescript // ❌ BAD: Testing that the mock exists test('renders sidebar', () = { render(<Page /); expect(screen.getByTestId('sidebar-mock')).toBeInTheDocument(); }); Why this is wrong: - You're verifying the mock works, not that the component works - Test passes when mock is present, fails when it's not - Tells you nothing about real behavior your human partner's correction: "Are we testing the behavior of a mock?" The fix: typescript // ✅ GOOD: Test real component or don't mock it test('renders sidebar', () = { render(<Page /); // Don't moc

Explore related resources

Frequently asked questions

What is testing-anti-patterns?

testing-anti-patterns is a open-source AI agent skill with Copy skill directory. Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking.

Who is testing-anti-patterns best for?

testing-anti-patterns is best for reusing agent instructions, scripts, and references, testing workflows, writing workflows.

How do I install testing-anti-patterns?

Install or run testing-anti-patterns using Copy skill directory. Check testing-anti-patterns for the latest setup command.

Is testing-anti-patterns actively maintained?

testing-anti-patterns may need a closer maintenance check before production use.

Share:

Stars
4,934
Forks
581
Last commit
9 days ago
Repository age
7 years
License
MIT

Auto-fetched from GitHub.

Ad
Favicon

 

  
 

Similar to testing-anti-patterns

testing-anti-patterns: Install, Config & GitHub Signals – SkillIndex