vitest

Migrate Jest test suites to Vitest using automated codemods and configuration generation.

12|2|Updated Mar 11, 2025
One-click install
npx skills add https://github.com/el-feo/ai-context --skill vitest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest
Source: https://github.com/el-feo/ai-context/tree/main/skills/vitest
Command: npx skills add https://github.com/el-feo/ai-context --skill vitest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill focuses on migrating from Jest to Vitest with automated tooling, configuration guidance, and best practices for a smooth transition.

Core Features & Use Cases

  • Automated codemods for Jest→Vitest translation.
  • Comprehensive API mapping and configuration guidance.
  • Framework-specific guidance for React, Vue, and TypeScript projects.

Quick Start

Use the migration script to convert tests, set up vitest.config.ts, and update package.json scripts.

Frequently Asked Questions about vitest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Jest tests to Vitest automatically?

Jest-to-Vitest migration uses automated codemods to translate test syntax, API calls, and configuration. The migration workflow applies codemods across your test suite, generates a vitest.config.ts file, updates package.json scripts, and handles framework-specific setup for React, Vue, Next.js, and Node projects in both JavaScript and TypeScript.

Can I migrate Jest tests without rewriting them manually?

Yes. Automated codemods handle the majority of Jest-to-Vitest translation, including API mappings and configuration changes. The migration includes scripts to update dependencies and test runners, reducing manual effort. Framework-specific adjustments and optional backup guidance are provided for edge cases.

Does Jest-to-Vitest migration work with React, Vue, and TypeScript projects?

Migration supports Jest test suites across React, Vue, Next.js, and Node projects in both JavaScript and TypeScript. Framework-specific guidance handles environment setup, configuration generation, and API adjustments tailored to each framework's testing patterns.

What happens to my Jest configuration when migrating to Vitest?

Configuration migration maps Jest settings to Vitest equivalents and generates a vitest.config.ts file. The process includes test-environment setup, dependency updates in package.json, and script rewrites. Complete workflow guidance ensures your existing Jest configuration translates correctly to Vitest.

Can I roll back if the Vitest migration fails?

The migration workflow includes optional backup and rollback guidance to revert changes if needed. Review the rollback documentation before running codemods to understand recovery steps for your specific project setup.