Skip to content

Vitest: resolved.coverage.exclude is not iterable in v20.1.0-next.1 #30543

Closed

Description

@cexbrayat

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.1.0-next.0

Description

Running ng test with the vitest runner in v20.1.0-next.1 throws resolved.coverage.exclude is not iterable even without code coverage.

Minimal Reproduction

Generate a new app:

npx @angular/[email protected] new vitest-coverage --no-routing --defaults
cd vitest-coverage
npm install vitest jsdom --save-dev

Use the unit-test builder:

"test": {
  "builder": "@angular/build:unit-test",
  "options": {
    "tsConfig": "tsconfig.spec.json",
    "buildTarget": "::development",
    "runner": "vitest"
  }
}

Run ng test

Exception or Error

NOTE: The "unit-test" builder is currently EXPERIMENTAL and not ready for production use.
Initial chunk files  | Names             |  Raw size
chunk-46DE7USU.js    | -                 |   1.96 MB | 
init-testbed.js      | init-testbed      | 236.22 kB | 
polyfills.js         | polyfills         | 156.69 kB | 
spec-app-app.spec.js | spec-app-app.spec |  47.18 kB | 
styles.css           | styles            |  56 bytes | 

                     | Initial total     |   2.40 MB

Application bundle generation complete. [2.017 seconds]

Watch mode enabled. Watching for file changes...
An unhandled exception occurred: resolved.coverage.exclude is not iterable
See "/private/var/folders/fl/sx8_jbfd1gg3gg04jb0lr_n00000gn/T/ng-bvwmWs/angular-errors.log" for further details.

Your Environment

Angular CLI: 20.1.0-next.1
Node: 22.14.0
Package Manager: npm 10.9.0
OS: darwin arm64

Angular: 20.1.0-next.1
... build, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2001.0-next.1
@angular-devkit/core         20.1.0-next.1
@angular-devkit/schematics   20.1.0-next.1
@schematics/angular          20.1.0-next.1
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else relevant?

Reverting to next.0 solves the issue

Activity

  1. added a commit that references this issue on Jun 16, 2025
    007b160
  2. added a commit that references this issue on Jun 17, 2025
    130c650
  3. angular-automatic-lock-bot commented on Jul 18, 2025

    @angular-automatic-lock-bot

    This issue 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.

  4. locked and limited conversation to collaborators on Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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