vitest-test-scaffolder

Generate Vitest unit tests for React components and hooks.

1|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/okgoogle13/careercopilot --skill vitest-test-scaffolder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest-test-scaffolder
Source: https://github.com/okgoogle13/careercopilot/tree/main/.claude/skills/vitest-test-scaffolder
Command: npx skills add https://github.com/okgoogle13/careercopilot --skill vitest-test-scaffolder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires vitest, @testing-library/react, @testing-library/user-event.

What problem does it solve?

Writing unit tests for React components and hooks is crucial but can be time-consuming and repetitive. This skill automates the generation of comprehensive Vitest test files, adhering to best practices and accelerating your testing workflow.

Core Features & Use Cases

  • Automated Test Generation: Scaffolds Vitest unit tests for React components and hooks, including render, props, interaction, state, and accessibility tests.
  • React Testing Library Best Practices: Utilizes screen queries, userEvent for realistic interactions, and vi.fn() for mocks, ensuring high-quality, maintainable tests.
  • Comprehensive Scenarios: Includes boilerplate for common test cases like disabled states, loading states, and error handling, with clear TODOs for edge cases and snapshots.
  • Use Case: When developing new React components or hooks, use this skill to quickly generate a robust test suite, accelerating your development workflow and improving code quality.

Quick Start

Create Vitest unit tests for the 'Button' component located at 'src/components/ui/Button/Button.tsx'.