testing

Plan, write, and verify React frontend tests with Vitest, Playwright, and MSW.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/goldbergyoni/frontend-testing-setup --skill testing-goldbergyoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/goldbergyoni/frontend-testing-setup/tree/main/example-app/.claude/skills/testing
Command: npx skills add https://github.com/goldbergyoni/frontend-testing-setup --skill testing-goldbergyoni

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill centralizes testing guidance for frontend projects, helping teams plan, write, and verify tests with a structured workflow. It reduces cognitive load and time spent searching for best practices by providing a cohesive, go-to reference across planning, coding, and verification.

Core Features & Use Cases

  • Comprehensive Testing Workflow: Guides you through planning, writing, and verifying tests using a consistent methodology.
  • Documentation Library: Provides templates and patterns for test planning, data, patterns, and failure handling to improve test quality.
  • Fast Onboarding: New contributors can quickly learn the project’s testing conventions and tooling (Vitest, Playwright, MSW).

Quick Start

Start by planning tests for a target page with the /plan-test command, then generate a test plan (test-plan.md) and follow up by writing tests with /write-tests and finally verify coverage and quality with /verify-test.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I plan and write tests for React components?

Plan tests by analyzing your React components and UI workflows, then write tests following AAA patterns (Arrange, Act, Assert) using Vitest as your test runner. Start with the /plan-test command to generate a test plan, then use /write-tests to implement tests with structured guidance for components and features.

What's the best way to mock API calls in frontend tests?

Mock APIs using MSW (Mock Service Worker) to intercept network requests during testing. MSW lets you define handlers for endpoints your frontend consumes, providing consistent mocked responses without modifying application code or test setup.

How do I set up end-to-end testing for frontend workflows?

Use Playwright to write end-to-end tests that verify complete user workflows across your application. Playwright automates browser interactions, capturing real user behavior patterns for features, page navigation, and form submissions.

Can I use Vitest and Playwright together in the same project?

Yes. Vitest handles unit and component tests for isolated logic and React rendering, while Playwright runs end-to-end tests for full workflows. This Skill guides you through both, applying each tool where it fits your testing strategy.

How do I verify test coverage and quality across my project?

Use the /verify-test command to analyze test coverage, check for gaps in your test suite, and validate that tests follow quality standards like AAA patterns and proper data factories. Coverage reports identify untested code paths.

What testing patterns should I follow for maintainable tests?

Follow AAA patterns (Arrange, Act, Assert), use data factories to manage test fixtures, and apply MSW for consistent API mocking. This Skill documents these patterns with templates so new contributors can write tests matching your project's conventions quickly.