Movatterモバイル変換


[0]ホーム

URL:


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 20 + zone.js 0.15.x: Unit tests fail with NG0908 and "zone-testing.js not found" #64280

Open
Labels
needs reproductionThis issue needs a reproduction in order for the team to investigate further
@joedelgado

Description

@joedelgado

Which @angular/* package(s) are the source of the bug?

zone.js

Is this a regression?

No

Description

Description / Descripción:

This StackBlitz demonstrates a minimal Angular 20 project withzone.js@0.15.x where unit tests cannot run due to the following error:

NG0908: In this configuration Angular requires Zone.js
zone-testing.js is needed for the fakeAsync() test helper but could not be found.

The project includes a minimal AppComponent and a basic test in app.component.spec.ts.
The test.ts file imports zone.js and zone.js/testing as recommended.
All dependencies are set to the latest Angular 20 and zone.js 0.15.x versions.
How to reproduce:

Clone this project locally or use the same setup in your environment.
Run npm install and then ng test.
Observe that all tests fail with the error above.
Note:
StackBlitz may not support running ng test directly, but this code matches the setup that fails locally.

Please provide a link to a minimal reproduction of the bug

stackblitz-comeditangular-9vvkqanb-filesrc2ftest-ts

Please provide the exception or error you saw

NG0908: In this configuration Angular requires Zone.jszone-testing.js is needed for the fakeAsync() test helper but could not be found.

Please provide the environment you discovered this bug in (runng version)

Angular CLI: 20.3.4Node: 22.19.0Package Manager: npm 10.9.3OS: win32 x64    Angular: 20.3.3... common, compiler, compiler-cli, core, forms... platform-browser, platform-server, routerPackage                      Version------------------------------------@angular-devkit/architect    0.2003.4@angular-devkit/core         20.3.4@angular-devkit/schematics   20.3.4@angular/build               20.3.4@angular/cdk                 20.2.7@angular/cli                 20.3.4@angular/material            20.2.7@angular/ssr                 20.3.4@schematics/angular          20.3.4rxjs                         7.8.2typescript                   5.9.3zone.js                      0.15.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp