vitest-test-scaffolder
CommunityGenerate React component tests, instantly.
Authorokgoogle13
Version1.0.0
Installs0
System Documentation
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
screenqueries,userEventfor realistic interactions, andvi.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'.
Dependency Matrix
Required Modules
vitest@testing-library/react@testing-library/user-event
Components
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: vitest-test-scaffolder Download link: https://github.com/okgoogle13/careercopilot/archive/main.zip#vitest-test-scaffolder Please download this .zip file, extract it, and install it in the .claude/skills/ directory.