What problem does it solve?
This Skill provides comprehensive patterns and examples for writing effective unit, integration, and accessibility tests for frontend applications using Vitest, React Testing Library, and Vue Test Utils. It helps ensure your components behave as expected and your application is reliable.
Core Features & Use Cases
- Component Testing: Write tests for individual React and Vue components, including rendering, user interactions, and state management.
- API Mocking: Mock external API calls to isolate components and ensure test predictability.
- Hook Testing: Test custom React hooks for logic and state changes.
- Accessibility Testing: Integrate tools like
jest-axe to ensure your UI is accessible.
- Use Case: You need to write tests for a new React form component to verify that it correctly handles user input, displays validation errors, and submits data upon successful validation.
Quick Start
Use the testing-frontend skill to write a basic component test for a React component named UserCard.