Skip to content

feat(zone.js): support vitest patching in zone.js/testing#68395

Closed
hawkgs wants to merge 3 commits into
angular:mainfrom
hawkgs:zone/vitest-patching
Closed

feat(zone.js): support vitest patching in zone.js/testing#68395
hawkgs wants to merge 3 commits into
angular:mainfrom
hawkgs:zone/vitest-patching

Conversation

@hawkgs
Copy link
Copy Markdown
Member

@hawkgs hawkgs commented Apr 27, 2026

The following PR introduces:

cc @dgp1130

To support `fakeAsync` usage while using `vitest` as a test runner, Zone.js
now provides patching when using the `zone.js/testing` package import.
This patching is similar to that of the existing jasmine, mocha, and jest
functionality.
@hawkgs hawkgs requested review from atscott and clydin April 27, 2026 13:00
@hawkgs hawkgs added the area: zones Issues related to zone.js label Apr 27, 2026
@ngbot ngbot Bot added this to the Backlog milestone Apr 27, 2026
@pullapprove pullapprove Bot requested a review from devversion April 27, 2026 13:00
@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Apr 27, 2026
@hawkgs hawkgs added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Apr 27, 2026
@hawkgs hawkgs force-pushed the zone/vitest-patching branch from 3f67ac4 to 19e6548 Compare April 27, 2026 13:21
@hawkgs hawkgs removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Apr 27, 2026
Copy link
Copy Markdown
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits, can you also please update the readme.

Comment thread packages/zone.js/package.json Outdated
Comment thread packages/zone.js/bundles.bzl Outdated
Copy link
Copy Markdown
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hawkgs hawkgs force-pushed the zone/vitest-patching branch from 19e6548 to 8397d2d Compare April 28, 2026 10:19
Test `fakeAsync` API in Vitest when Zone.js `vitest` patch applied.
@hawkgs hawkgs force-pushed the zone/vitest-patching branch from 8397d2d to dd42d18 Compare April 28, 2026 10:31
Copy link
Copy Markdown
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Apr 28, 2026
amishne pushed a commit that referenced this pull request Apr 28, 2026
…ion guide

Update the Karma to Vitest migration guide to include information about the zone.js Vitest patch that should handle `fakeAsync`.

Related to #68395.
@JeanMeche JeanMeche removed the request for review from devversion April 28, 2026 19:06
@hawkgs hawkgs added the action: merge The PR is ready for merge by the caretaker label Apr 29, 2026
@JeanMeche JeanMeche removed the request for review from clydin April 30, 2026 17:08
@alxhub
Copy link
Copy Markdown
Member

alxhub commented Apr 30, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@alxhub alxhub closed this in 62c6e3b Apr 30, 2026
alxhub pushed a commit that referenced this pull request Apr 30, 2026
Test `fakeAsync` API in Vitest when Zone.js `vitest` patch applied.

PR Close #68395
@hawkgs hawkgs deleted the zone/vitest-patching branch May 1, 2026 06:25
@angular-automatic-lock-bot
Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: zones Issues related to zone.js detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants