Skip to content

test/options/codeCoverageExclude option in angular.json is ignored in Angular 14 #23403

@vzakharov-rxnt

Description

@vzakharov-rxnt

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

Don't known / other

Is this a regression?

Yes

Description

After upgrading from Angular 13 to Angular 14, codeCoverageExclude is ignored by the test runner. I created a sample project on Github where the issue can be reproduced in a brand new Angular 14 boilerplate, with minimal changes. Please see the last commit for more details.

Please provide a link to a minimal reproduction of the bug

https://github.com/vzakharov-rxnt/codeCoverageExclude-issue

Please provide the exception or error you saw

No error, but codeCoverageExclude does not do anything in Angular 14. Used to work in Angular 13.

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

Angular CLI: 14.0.2
Node: 16.15.0
Package Manager: yarn 1.22.15
OS: win32 x64

Angular: 14.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.2
@angular-devkit/build-angular   14.0.2
@angular-devkit/core            14.0.2
@angular-devkit/schematics      14.0.2
@schematics/angular             14.0.2
rxjs                            7.5.5
typescript                      4.7.4

Anything else?

I ran this command to produce the code coverage report:

"cover": "ng test --no-watch --code-coverage"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions