testing-patterns

Verified·Scanned 2/19/2026

Unit, integration, and E2E testing patterns with framework-specific guidance. Use when asked to "write tests", "add test coverage", "testing strategy", "test this function", "create test suite", "fix flaky tests", or "improve test quality".

from clawhub.ai·v1·23.0 KB·0 installs
Scanned from 0.1.0 at 58b15e1 · Transparency log ↗
$ vett add clawhub.ai/wpank/testing-patterns

Testing Patterns

Unit, integration, and E2E testing patterns with framework-specific guidance. Write tests that catch bugs, not tests that pass — confidence through coverage, speed through isolation.

What's Inside

  • Testing pyramid with ratio, speed, and confidence breakdown
  • Unit testing patterns (Arrange-Act-Assert, Given-When-Then, parameterized, snapshot, property-based)
  • Test doubles guide (stubs, mocks, spies, fakes) with when-to-use guidance
  • Parameterized tests across TypeScript, Python, and Go
  • Integration testing patterns (transaction rollback, fixtures, factory functions, testcontainers)
  • API testing with Supertest
  • Mocking best practices (mock boundaries not implementations, dependency injection)
  • Framework quick reference (Jest, Vitest, Playwright, Cypress, pytest, Go testing, Rust, JUnit, RSpec, PHPUnit, xUnit)
  • Test quality checklist (deterministic, isolated, fast, readable, maintainable, focused)
  • Coverage strategy with targets by project type
  • Test organization conventions
  • Anti-patterns catalog

When to Use

  • Writing tests for new or existing code
  • Adding test coverage to a project
  • Defining a testing strategy
  • Fixing flaky tests or improving test quality
  • Choosing the right test doubles and patterns

Installation

npx add https://github.com/wpank/ai/tree/main/skills/testing/testing-patterns

Manual Installation

Cursor (per-project)

From your project root:

mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/testing/testing-patterns .cursor/skills/testing-patterns

Cursor (global)

mkdir -p ~/.cursor/skills
cp -r ~/.ai-skills/skills/testing/testing-patterns ~/.cursor/skills/testing-patterns

Claude Code (per-project)

From your project root:

mkdir -p .claude/skills
cp -r ~/.ai-skills/skills/testing/testing-patterns .claude/skills/testing-patterns

Claude Code (global)

mkdir -p ~/.claude/skills
cp -r ~/.ai-skills/skills/testing/testing-patterns ~/.claude/skills/testing-patterns

Related Skills

  • e2e-testing-patterns — Dedicated E2E patterns with Playwright and Cypress
  • testing-workflow — Meta-skill that orchestrates testing across a project
  • quality-gates — Coverage thresholds and CI/CD enforcement
  • clean-code — Code quality standards that tests verify

Part of the Testing skill category.