Skip to content

Bug: Code Coverage Report #5526

Closed
Closed
@niklas-wortmann

Description

@niklas-wortmann
- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

$ ng --version
@angular/cli: 1.0.0-rc.2
node: 6.9.5
os: win32 x64
@angular/common: 4.0.0-rc.5
@angular/compiler: 4.0.0-rc.5
@angular/core: 4.0.0-rc.5
@angular/forms: 4.0.0-rc.5
@angular/http: 4.0.0-rc.5
@angular/platform-browser: 4.0.0-rc.5
@angular/platform-browser-dynamic: 4.0.0-rc.5
@angular/router: 4.0.0-rc.5
@angular/cli: 1.0.0-rc.2
@angular/compiler-cli: 4.0.0-rc.5

Repro steps.

I have made a sample project, to reproduce this weird behaviour.
Please take a look at: https://github.com/Loster102/angular-coverage-sample
When I run 'ng test -cc true', there is a successful testrun.
But when I look at the coverage report, the branch coverage is really strange.
It says, that the constructor is not fully covered.
sample

Desired functionality.

I would have expected that even the constructor is fully covered.

Mention any other details that might be useful.

In my real world application, there are some further strange behaviours, exactly like the one above.
I try to reproduce these in the sample project. In this application, I'm using angular@4.0.0-rc.2 and @angular/cli@1.0.0-rc.1.

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulhelp wantedneeds: investigationRequires some digging to determine if action is neededtype: bug/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions