What problem does it solve?
This Skill provides a comprehensive guide and examples for Vitest, a fast Vite-native unit testing framework, enabling developers to write and run tests efficiently within their Vite projects.
Core Features & Use Cases
- Fast Test Execution: Offers rapid test execution with features like watch mode and HMR.
- Vite Integration: Seamlessly integrates with Vite projects, leveraging the same configuration.
- Component Testing: Supports testing Vue, React, and Svelte components.
- Browser Mode: Allows testing in actual browser environments.
- Mocking & Snapshots: Provides robust mocking capabilities and snapshot testing.
- Use Case: When developing a new feature in a Vue project, use Vitest to write unit tests for your components and utility functions, ensuring they work as expected before deployment.
Quick Start
Use the vitest skill to write a basic unit test for a JavaScript function.