vitest-config

Community

Configure Vitest for fast, reliable testing.

Authormetasaver
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Setting up Vitest for a project, especially with React and Vite, can be complex, leading to incorrect test environments, missing setup files, or incomplete coverage reporting. This skill automates Vitest configuration and validation, ensuring a robust testing setup.

Core Features & Use Cases

  • Standard Templates: Provides vitest.config.ts and src/test/setup.ts templates for consistent test setup.
  • 5-Rule Validation: Audits existing configurations against critical standards: merging with vite.config.ts, required test configuration (globals, jsdom environment), setup files, dependencies, and npm test scripts.
  • React Testing Ready: Configures jsdom environment and integrates @testing-library/jest-dom for effective React component testing.
  • Coverage Reporting: Sets up v8 provider with text, json, html reporters and exclusion patterns for comprehensive code coverage.
  • Use Case: Automatically configure Vitest for a new React project, ensuring the jsdom environment is set up, @testing-library/jest-dom is integrated, and test scripts are correctly defined, or audit an existing config for compliance.

Quick Start

Create vitest.config.ts and src/test/setup.ts for a new React project.

Dependency Matrix

Required Modules

None required

Components

assets

💻 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-config
Download link: https://github.com/metasaver/claude-marketplace/archive/main.zip#vitest-config

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository