What problem does it solve?
This Skill provides a comprehensive guide and reference for writing effective unit, component, and integration tests using the Vitest framework, ensuring code quality and maintainability.
Core Features & Use Cases
- Test Structure & Assertions: Learn to organize tests and write clear assertions.
- Mocking & Spying: Master techniques for isolating code under test.
- Component & Hook Testing: Test React components and custom hooks effectively.
- Configuration & CLI: Understand how to configure Vitest and leverage its command-line interface for efficient testing workflows.
- Use Case: When developing a new React component, use this Skill to learn how to write unit tests for its behavior, mock its dependencies, and ensure it renders correctly with different props.
Quick Start
Use the vitest-testing skill to write a unit test for the provided sum function.