migrate-to-rstest
Installation
SKILL.md
Migrate to Rstest
Goal
Migrate Jest/Vitest tests and config to Rstest with minimal behavior changes. Use the current Rstest migration docs for exact mappings; this skill adds scope, dependency, and cleanup guardrails.
Workflow
- Detect runner and scope (
references/detect-test-framework.md). - Run dependency/version gates (
references/dependency-install-gate.md). - Read only the needed deltas: Jest, Vitest, and/or global API replacement.
- Migrate scripts/config/setup before tests; prefer adapters or Rsbuild/Rspack config fixes before editing test bodies.
- Validate discovery/types/run, fixing failures in this order: dependency skew, config/resolver, setup/env/coverage, mocks/timers/snapshots, test bodies.
- After the scope is green, remove only scope-local legacy files and devDeps no remaining scope uses.
- Summarize changes, kept legacy files, unsupported fields, and TODOs.