I'm submitting a...
[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
Unit test coverage reporting is no longer accurate (shows missed branches outside of logic e.g. in imports)
Expected behavior
Unit test coverage accurately reports coverage.
Minimal reproduction of the problem with instructions
- Create a new angular 6 project:
ng new angular6-coverage-issue
- Execute tests with code coverage
ng test --code-coverage
- View HTML report


What is the motivation / use case for changing the behavior?
The motivation is to fix coverage reports so they can be used as an accurate measure.
Environment
For Tooling issues:
- Node version: 8.11.3
- Platform: Mac
Others:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.2.2
Node: 8.11.3
OS: darwin x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.8.2
@angular-devkit/schematics 0.8.2
@angular/cli 6.2.2
@ngtools/webpack 6.1.5
@schematics/angular 0.8.2
@schematics/update 0.8.2
rxjs 6.3.2
typescript 2.7.2
webpack 4.9.2
I'm submitting a...
Current behavior
Unit test coverage reporting is no longer accurate (shows missed branches outside of logic e.g. in imports)
Expected behavior
Unit test coverage accurately reports coverage.
Minimal reproduction of the problem with instructions
ng new angular6-coverage-issueng test --code-coverageWhat is the motivation / use case for changing the behavior?
The motivation is to fix coverage reports so they can be used as an accurate measure.
Environment