Skip to content

ng test --code-coverage in 6.1 improperly detecting branches #11672

Closed
@jhage-accesso

Description

@jhage-accesso

Bug Report or Feature Request (mark with an x)

- [ X ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ X ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

OS: macOS Sierra
Node: v8.9.4
NPM: 6.2.0

Ng Version:

Angular CLI: 6.1.0
Node: 8.9.4
OS: darwin x64
Angular: 6.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.0
@angular-devkit/build-angular     0.7.0
@angular-devkit/build-optimizer   0.7.0
@angular-devkit/build-webpack     0.7.0
@angular-devkit/core              0.7.0
@angular-devkit/schematics        0.7.0
@angular/cdk                      6.4.1
@angular/flex-layout              6.0.0-beta.16
@angular/material                 6.4.1
@ngtools/webpack                  6.1.0
@schematics/angular               0.7.0
@schematics/update                0.7.0
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.9.2

Repro steps

Run ng test --code-coverage
Notice that things like import statements are counted as if else branches.
image

The log given by the failure

No log file

Desired functionality

I expect to see things like import statements and decorator metadata to not be marked as if else branches in the code coverage report.

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions