Agent skill · Testing & QA

code-showcase-testing-patterns

Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill code-showcase-testing-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 7 KB
Bundled scripts: none
Path: skills/code-showcase-testing-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Testing Patterns and Utilities ## When to Use Use this skill when you need jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle. ## Testing Philosophy **Test-Driven Development (TDD):** - Write failing test FIRST - Implement minimal code to pass - Refactor after green - Never write production code without a failing test **Behavior-Driven Testing:** - Test behavior, not implementation - Focus on public APIs and business requirements - Avoid testing implementation details - Use descriptive test names that describe behavior **Factory Pattern:** - Create `getMockX(overrides?: Partial<X>)` functions - Provide sensible defaults - Allow overriding specific properties - Keep tests DRY and maintainable ## Test Utilities ### Custom Render Function Create a custom render that wraps components with required providers: ```typescript // src/utils/testUtils.tsx import { render } from '@testing-library/react-native'; import { ThemeProvider } from './theme'; export const renderWithTheme = (ui: React.ReactElement) => { return render( <ThemeProvider>{ui}</ThemeProvider> ); }; `

What's inside
Steps it walks through
  1. When to Use
  2. Testing Philosophy
  3. Test Utilities
  4. Custom Render Function
  5. Factory Pattern
  6. Component Props Factory
  7. Data Factory
  8. Mocking Patterns
  9. Mocking Modules
  10. Mocking GraphQL Hooks
  11. Test Structure
  12. Query Patterns
  13. User Interaction Patterns
  14. Anti-Patterns to Avoid
Commands it runs
Run all tests
npm test
Run with coverage
npm run test:coverage
Run specific file
npm test ComponentName.test.tsx
More from agentic-awesome-skills
All skills →
About this skill
What does the code-showcase-testing-patterns skill do?

Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill code-showcase-testing-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going