Test Frontend

Run and validate React/Vite frontend tests with Vitest and React Testing Library.

17|1|Updated Nov 17, 2024
One-click install
npx skills add https://github.com/ruska-ai/orchestra --skill test-frontend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Test Frontend
Source: https://github.com/ruska-ai/orchestra/tree/main/.claude/skills/test-frontend
Command: npx skills add https://github.com/ruska-ai/orchestra --skill test-frontend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers validate frontend quality by executing and monitoring React/Vite test suites, providing quick feedback on code changes, coverage, and failures.

Core Features & Use Cases

  • Run all tests in the frontend project (npm run test) to verify baseline quality.
  • Watch for changes (npm run test:watch) to receive instant feedback during development.
  • Generate code coverage reports (npm run test:coverage) to identify untested areas.
  • Diagnose and report test failures to guide fast fixes.
  • Assist with writing or updating tests using Testing Library patterns.

Quick Start

Navigate to the frontend/ directory and choose one of the following commands:

  • npm run test
  • npm run test:watch
  • npm run test:coverage

Frequently Asked Questions about Test Frontend

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

FAQPage Schema
How do I run frontend tests for a React and Vite project?

Run frontend tests by navigating to the frontend/ directory and executing npm run test, which uses Vitest to validate your React/Vite project baseline quality.

Can I generate code coverage reports using Vitest and React Testing Library?

Yes, generate code coverage reports by running npm run test:coverage in the frontend/ directory to identify untested areas in your React components and logic.

How do I watch for test changes during React frontend development?

Watch for test changes by running npm run test:watch from the frontend/ directory, providing instant feedback on code modifications during your development workflow.

Do I need Node.js and npm to run Vitest tests for React?

Yes, you need Node.js and npm installed to execute tests, as the workflow runs from the frontend/ directory using npm commands with Vitest and jsdom environment configuration.

Where should test files be located for a React Vite project using Testing Library?

Test files should be located in the frontend/src/tests/ directory, allowing Vitest to automatically discover and execute them using React Testing Library patterns.

What is the best way to diagnose frontend test failures in a React project?

Diagnose frontend test failures by running the test suite to receive automated reports, guiding you towards fast fixes for failing React component assertions and errors.