test

Route testing questions to unit, integration, or E2E test types.

2|2|Updated May 30, 2025
One-click install
npx skills add https://github.com/wodsmith/thewodapp --skill test-wodsmith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test
Source: https://github.com/wodsmith/thewodapp/tree/main/.claude/skills/test
Command: npx skills add https://github.com/wodsmith/thewodapp --skill test-wodsmith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill routes you to the correct testing approach (unit, integration, or E2E) based on what you're testing, embedding Testing Trophy philosophy and TDD Red-Green-Refactor as core discipline.

Core Features & Use Cases

  • Test-type guidance: Decide between unit, integration, and E2E tests based on context.
  • TDD discipline: Encourages Red-Green-Refactor workflow and boundary-aware testing.
  • Patterns & quick-start: Includes factory patterns and async testing practices.

Quick Start

Use the unit-test, integration-test, or e2e-test starter depending on your goal, e.g., skills_use(name="unit-test").

Frequently Asked Questions about test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide between unit, integration, and E2E tests?

Unit tests validate individual functions in isolation, integration tests verify components work together, and E2E tests confirm the full user workflow. Choose based on scope: unit for logic, integration for component boundaries, E2E for critical paths. Testing Trophy philosophy prioritizes integration tests as your foundation.

What is the Red-Green-Refactor workflow in TDD?

Red-Green-Refactor is TDD's core cycle: write a failing test (Red), write minimal code to pass it (Green), then improve the code without changing behavior (Refactor). This discipline ensures tests drive design and catch regressions early.

How do I write async tests with Vitest?

Vitest supports async testing through async test functions and utilities like `waitFor()` for integration tests. Return promises from test cases or use async/await syntax. Mock timers and promises to isolate async behavior in unit tests.

When should I use mocking in tests?

Mock external dependencies, APIs, and I/O in unit tests to isolate code logic. Use mocking sparingly in integration tests to avoid masking real interaction bugs. E2E tests typically avoid mocks to validate actual system behavior.

What's the difference between testing strategy and test types?

Test types (unit, integration, E2E) describe scope. Testing strategy defines how many of each type you need based on risk and coverage goals. Testing Trophy recommends a pyramid: many unit tests, moderate integration tests, few E2E tests.

Can I use factory patterns to set up test data?

Yes, factory patterns simplify creating test fixtures and mock objects consistently. Factories reduce boilerplate in test setup, improve maintainability, and ensure realistic test data across unit and integration tests.