Migrate To Rstest logo

Migrate To Rstest

Organization
rstackjs
migrate-to-rstest

Migrate Jest, Vitest, or Playwright Test to Rstest while preserving test discovery, assertions, mocks, snapshots, and coverage.

Overview

Publisherrstackjs
Repositoryagent-skills
Skill namemigrate-to-rstest
Stars
93
Forks
4
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by rstackjs on GitHub. Read the source before you install it.

Installation

Install the Migrate To Rstest AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rstackjs/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/migrate-to-rstest .claude/skills/migrate-to-rstest
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Migrate To Rstest in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Migrate To Rstest on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Migrate To Rstest is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Migrate to Rstest

Goal

Migrate the smallest runnable Jest, Vitest, or Playwright Test scope with minimal behavior change. Use documentation and types that match the installed Rstest version; use latest online docs only after the capability gate confirms they apply.

Workflow

  1. Detect the runner, environment, Rstack integration, and smallest runnable scope with references/detect-test-framework.md.
  2. Run references/dependency-install-gate.md before choosing Rstest, coverage, adapter, or plugin APIs.
  3. Before editing, record the exact command, Node and runner versions, environment, files/tests/skips/snapshots, and failures. Capture the pre-migration test manifest and follow references/discovery-parity.md throughout the migration.
  4. For Jest read references/jest-migration-deltas.md; for Vitest read references/vitest-migration-deltas.md; for global APIs also read references/global-api-migration.md; for a detected Playwright Test runner read references/playwright-migration-deltas.md. Do not load the Playwright path for a browser-only request whose runner is not Playwright Test. Migrate scripts, config, and setup before editing test bodies; prefer adapter or Rsbuild/Rspack fixes over broad test rewrites.
  5. If config loading emits [MODULE_TYPELESS_PACKAGE_JSON], use references/config-module-type.md. Do not suppress the warning or change the whole package module type without an audit.
  6. Get the migrated scope semantically green. Fix failures in this order: dependency skew, config/resolver, discovery, setup/environment/coverage, mocks/timers/snapshots, then test bodies.
  7. Compare the post-migration manifest and execution counts with the baseline. Classify every added, removed, skipped, or excluded test explicitly; do not call a run equivalent merely because it is green. For Jest snapshot migrations, also complete the snapshot cleanup and unchecked validation in references/jest-migration-deltas.md.
  8. Remove temporary aliases, diagnostic hooks, and copied legacy workarounds that are no longer required. Keep only configuration proven necessary by behavior or measurement.
  9. If wall time, build, test runtime, logs, or memory materially regress, load and follow the rstest-debugging skill when available. Otherwise use the migration fallback in references/performance-diagnosis.md, then read references/dependency-bundling-performance.md and/or references/mocked-module-build-graph.md according to the measured bottleneck. Change one variable at a time.
  10. After correctness and performance validation, remove only legacy files and dependencies owned by the migrated scope. Summarize behavior parity, discovery differences, unsupported fields, retained compatibility config, performance tradeoffs, and TODOs.

Guardrails

  • Keep the smallest viable scope. Do not broaden a monorepo migration because scopes share a lockfile.
  • Do not change production behavior, assertions, test names, scenarios, coverage thresholds, or ignore directives to make migration pass.
  • Do not introduce jest/vi shims or aliases; rewrite call sites with references/global-api-migration.md.
  • Do not silently drop unknown config fields or historical excludes. Verify, replace, or report each one.
  • Do not compare performance across different test manifests, Node versions, coverage modes, cache states, or worker settings.
  • Keep the previous runner until Rstest is green. Use a local Rstest checkout only for labeled diagnostics, then validate the final result with the project's installed dependency.
  • Escalate before many test edits or any production-source change: report why smaller config/setup fixes failed, options, risks, and the recommended path.

High-risk Rstest deltas

  • rstest / rstest run is single-run; watch mode is rstest --watch or rstest watch.
  • globals defaults to false; preserving global APIs requires globals: true and @rstest/core/globals types.
  • Rstest builds before tests run. rs.mock() is runtime replacement and does not by itself prune the real module graph.
  • Dependency bundling trades compiler work for runtime Node loading. Neither “bundle all” nor “externalize all” is universally faster; measure a representative file and the full scope.
  • An externalized runtime mock must match the exact request and module format. A config-wide external is unsafe when any test needs the real module.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Migrate To Rstest AI skill do?

Migrate Jest, Vitest, or Playwright Test to Rstest while preserving test discovery, assertions, mocks, snapshots, and coverage.

Why use Migrate To Rstest on TypingMind?

Because you install it once and use it with any model. Migrate To Rstest is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Migrate To Rstest in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/rstackjs/agent-skills/tree/main/skills/migrate-to-rstest. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Migrate To Rstest?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Migrate To Rstest?

As many as you like. As long as a model supports skills, you can use Migrate To Rstest with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Migrate To Rstest AI skill free?

Yes. It is published on GitHub by rstackjs under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇