Skip to content

Error on npx karma run since ProgressNotifierReporter #31629

@nicojs

Description

@nicojs

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

20.2

Description

The new injected ProgressNotifierReporter (new in Angular 20.3.0) doesn't fully implement Karma's reporter contract. Namely, it misses the adapters array. This means karma run results in an error.

Image

Minimal Reproduction

npm install -g @angular/cli@latest
ng new --defaults example
cd example
npx ng test

# On another shell:
npx karma run

Exception or Error

29 10 2025 08:30:25.675:WARN [karma]: Error during refresh file list. TypeError: Cannot read properties of undefined (reading 'push')
    at /Users/nicojs/repos/tmp/StrykerMutatorTest/node_modules/karma/lib/reporters/multi.js:11:61
    at Array.forEach (<anonymous>)
    at MultiReporter.addAdapter (/Users/nicojs/repos/tmp/StrykerMutatorTest/node_modules/karma/lib/reporters/multi.js:11:21)
    at Server.<anonymous> (/Users/nicojs/repos/tmp/StrykerMutatorTest/node_modules/karma/lib/middleware/runner.js:97:18)
    at Object.onceWrapper (node:events:633:26)

Your Environment

Angular: 20.3.7
... build, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.7
@angular-devkit/core         20.3.7
@angular-devkit/schematics   20.2.2
@angular/cli                 20.2.2
@schematics/angular          20.2.2
rxjs                         7.8.2
typescript                   5.9.3
zone.js                      0.15.1

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions