testing-patterns

Installation
SKILL.md

Testing Patterns — Cross-Stack Testing Mastery


Mandatory Pre-Flight Context Inspection

Before writing unit, integration, or component tests, you MUST inspect:

  1. AAA Pattern & Single Act Rule (Section 37) → Structure tests strictly as Arrange-Act-Assert; perform only 1 single action per test case
  2. Accessibility-First Query Hierarchy (Section 343) → Query React components by getByRole or getByLabelText; ban default getByTestId queries
  3. Dependency Injection Over Global Mocks (Section 268) → Prefer constructor dependency injection over global vi.mock() to prevent cross-test state leakage

Activation Boundaries

  • Activate when: Operating in tasks requiring Testing mastery across stacks. Unit testing with Jest/Vitest/pytest, integration testing, E2E with Playwright, mocking strategies, test architecture (AAA, Given-When-Then), code coverage, snapshot testing, API testing, component testing with Testing Library, and TDD workflow. Use when writing tests, designing test architecture, or improving test coverage..
  • DO NOT activate when: The task falls strictly outside testing-patterns domain or belongs to a different dedicated specialist.

Installs
3
GitHub Stars
7
First Seen
Apr 26, 2026