testing-patterns

Standardizes Vitest, Testing Library, and Playwright tests with MSW and Testcontainer.

2|Updated Aug 20, 2025
One-click install
npx skills add https://github.com/JasonPaff/head-shakers --skill testing-patterns-jasonpaff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/JasonPaff/head-shakers/tree/main/.claude/skills/testing-patterns
Command: npx skills add https://github.com/JasonPaff/head-shakers --skill testing-patterns-jasonpaff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill standardizes testing practices across unit, integration, component, and E2E tests, ensuring consistent test structure, mocking, and data management, leading to higher code quality and faster development cycles.

Core Features & Use Cases

  • Comprehensive Testing Framework: Guides the use of Vitest for unit/integration/component tests, Testing Library for React components, and Playwright for E2E scenarios.
  • Standardized Mocking & Fixtures: Enforces the use of MSW for API mocking, Testcontainers for database integration, and factories for consistent test data.
  • Organized Test Structure: Ensures tests are placed in appropriate tests/ subdirectories (unit/, integration/, components/, e2e/) with clear naming conventions.
  • Use Case: When generating a new component test for a 'UserProfile' React component, this Skill ensures it uses customRender from Testing Library, mocks any external API calls with MSW handlers, and asserts component behavior using getByRole or getByTestId.

Quick Start

Generate a new component test for a 'UserProfile' React component, using customRender from Testing Library and mocking any external API calls with MSW.