Dojo IA // andreramos.dev
Angular Vitest Migration Kit
Karma/Jasmine to Vitest, fakeAsync included
André Ramosandreramos.dev · Edition 2026
A paid kit for Angular teams moving to Vitest
Angular 21.2.14 · Vitest 4.1.8 · June 2026
Move your Angular test suite from Karma/Jasmine to Vitest without losing an afternoon to fakeAsync.
Scan your Karma/Jasmine suite to size the Vitest migration by risk, then convert every test that breaks. The config, the fakeAsync cookbook, an AI-agent skill, and a runnable Angular v21 demo.
Verified on Angular 21.2.14 / Vitest 4.1.8. Includes the migration estimator, the PDF guide, copy-paste config, an AI-agent skill, and a runnable demo.
Dojo IA // andreramos.dev
Karma/Jasmine to Vitest, fakeAsync included
André Ramosandreramos.dev · Edition 2026
01 / The problem
Angular v21 makes Vitest the default test runner. Most specs come along quietly. The ones that bend time do not: fakeAsync, tick, flush, and waitForAsync throw the ProxyZone error (Expected to be running in 'ProxyZone', but it was not found), because the Vitest builder does not apply zone.js's test patches. The official schematic converts spyOn and friends but leaves these for you. This kit tells you how big the job is, then shows you the how.
02 / Inside
Everything packaged from a real, passing Angular v21 project. Nothing you have to adapt from theory.
A migration estimator: a dependency-free script that scans your specs and buckets every fakeAsync test by risk (LOW timer, MEDIUM RxJS, HIGH Promise-in-chain), with an effort estimate. Scope the job before you start.
A branded PDF guide: the config, the 7-step runbook, the Jasmine to Vitest cheatsheet, and the fakeAsync cookbook, organized by the same risk tiers.
The fakeAsync cookbook: before/after conversions for every pattern that breaks (timers, RxJS debounce, debounce + HttpClient, async validators, OnPush components, signal effects, marble tests), including the microtask trap that silently breaks Promise-based tests.
Copy-paste config: the real angular.json test target and tsconfig.spec.json, plus a headless GitHub Actions workflow.
An AI-agent skill (SKILL.md + references) so Claude Code, Cursor, or Copilot can run the migration on your codebase: it scopes with the estimator, works the HIGH-risk tests first, and stops only on a green run.
A runnable companion app: a real Angular v21 project where every conversion passes. npm install, npm test, eleven green.
03 / Reader
04 / Version
Built and verified on Angular 21.2.14 and Vitest 4.1.8 (June 2026). Vitest support in Angular is still settling, so the kit carries a version stamp and gets updated when a release changes the migration story.
05 / Proof
Every conversion in the guide is a passing test in the companion app that ships with the kit: eleven of them, green. Clone it, run npm test, and read the specs next to the guide. The config is not a snippet someone hopes works. It ran.
Read the Vitest article ↗06 / Get the kit
One-time payment, instant download: the PDF guide, the copy-paste config, the AI-agent skill, and the runnable demo. The version stamp tells you exactly what it was built against.
07 / FAQ
Because the Vitest builder does not wrap your tests in the ProxyZone that fakeAsync, tick, flush, and waitForAsync rely on. There is an experimental escape hatch (add zone.js/plugins/vitest-patch to your test polyfills, in the right order, with specs running on Vitest globals) that keeps the old tests alive. But the Angular team recommends converting to native async and Vitest fake timers, and that recommended rewrite is what the kit's cookbook does, pattern by pattern, including the microtask trap that needs await vi.advanceTimersByTimeAsync.
Run the included estimator (node estimate.mjs src). It scans your specs and buckets every fakeAsync test into LOW (pure timer, mechanical), MEDIUM (RxJS scheduler, verify), and HIGH (a Promise is in the chain, needs review), with a rough effort range. You get a number to take to your lead, and a clear place to start: the HIGH files.
A PDF guide plus a .zip with the estimator script, the copy-paste config files, the AI-agent skill, and the runnable demo app. You download it right after checkout.
No. The official docs list the steps but do not give you the fakeAsync conversions, which is where the work is. Every conversion here was run in a real v21 project, and every pattern that breaks has a tested before/after pair. The estimator and the AI-agent skill are not in the docs at all.
Yes. It carries a version stamp (Angular 21.2.14 / Vitest 4.1.8) and is updated when a release changes the migration. Vitest in Angular is still stabilizing.
The free Modern Angular Playbook is the decision map across modern Angular. This kit is the deep, hands-on guide for one migration: Karma/Jasmine to Vitest. Different jobs.
That is what the included skill is for. Point Claude Code, Cursor, or Copilot at it and it applies the same conversions. Read the cookbook first so you can review what it produces.