Vitest Migration

Migrate Web Test Runner Mocha/Chai/Sinon test suites to Vitest browser mode.

68|37|Updated Apr 12, 2022
One-click install
npx skills add https://github.com/tyler-technologies-oss/forge --skill vitest-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Vitest Migration
Source: https://github.com/tyler-technologies-oss/forge/tree/main/.claude/skills/vitest-migration
Command: npx skills add https://github.com/tyler-technologies-oss/forge --skill vitest-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates Web Test Runner Mocha/Chai/Sinon test suites to Vitest browser mode, enabling a smoother transition and modern testing experience.

Core Features & Use Cases

  • Phase-based migration workflow with practical guidance for updating imports, fixtures, and test harness patterns.
  • Adaptation of browser commands and fixtures to Vitest browser mode for consistent test results.
  • Real-world scenarios include converting existing .test.ts suites and ensuring compatibility with Vitest's environment.

Quick Start

Run a simple migration on a sample test file to create a corresponding .vitest.ts with updated imports.

Frequently Asked Questions about Vitest Migration

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

FAQPage Schema
How do I migrate Mocha and Chai test suites to Vitest browser mode?

Migrate Mocha and Chai test suites to Vitest browser mode by following a structured phase-based workflow that updates imports, converts fixtures, and adapts test harness patterns for consistent results.

Can I convert existing .test.ts files to Vitest, or do I need to rewrite them?

You can convert existing .test.ts files directly to Vitest by creating corresponding .vitest.ts files with updated imports and adapted browser command usage, avoiding a complete rewrite.

What is the best way to handle Sinon stubs and spies during a Vitest migration?

Handle Sinon stubs and spies during a Vitest migration by adapting existing test harness patterns and browser command usage to Vitest's environment using provided guidance and best practices.

Does Web Test Runner migration to Vitest support updating fixtures and browser commands?

Yes, Web Test Runner migration to Vitest supports updating fixtures and browser command usage, adapting them to Vitest browser mode to ensure reliable and maintainable test execution.

What are the phases involved in migrating tests to Vitest?

Migrating tests to Vitest involves a structured three-phase workflow that provides practical guidance for updating imports, adapting test harness patterns, and ensuring environment compatibility.

Why should I migrate from Web Test Runner to Vitest browser mode?

Migrating from Web Test Runner to Vitest browser mode enables a smoother transition and modern testing experience by providing structured patterns for converting test suites and harnesses.