Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

@angular/builder:unit-test doesn't support fakeAsync #31094

Open
@th0r

Description

Command

test

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Using fakeAsync wrapper in unit tests served by the @angular/builder:unit-test builder with vitest runner causes an Expected to be running in 'ProxyZone', but it was not found error.

Minimal Reproduction

Clone the reproduction repo (https://github.com/th0r/ng-vitest-fake-async-bug) and run npm i && npm run test. You'll see the following error:

Expected to be running in 'ProxyZone', but it was not found.

Exception or Error

Error: Expected to be running in 'ProxyZone', but it was not found.
 ❯ _ProxyZoneSpec.assertPresent node_modules/zone.js/fesm2015/zone-testing.js:2042:18
 ❯ fakeAsyncFn node_modules/zone.js/fesm2015/zone-testing.js:1697:44
 ❯ new ZoneAwarePromise node_modules/zone.js/fesm2015/zone.js:2701:24

Your Environment

Angular CLI: 20.2.1
Node: 22.16.0
Package Manager: npm 10.9.3
OS: darwin arm64
Angular: 20.2.3
... common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------
@angular-devkit/architect 0.2002.1
@angular-devkit/core 20.2.1
@angular-devkit/schematics 20.2.1
@angular/build 20.2.1
@angular/cli 20.2.1
@schematics/angular 20.2.1
rxjs 7.8.2
typescript 5.9.2
zone.js 0.15.1

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /