Describe the bug
When running test coverage any import into a constructor (and some other things) show a false "uncovered branch" where there is no branch.
This is a long standing issue with istanbul that I believe was finally resolved.
According to this issue https://github.com/kulshekhar/ts-jest/issues/818 on ts-jest this can be resolved by simply upgrading jest-preset-angular to 7.0.0-alpha.1 instead of the current ^6.0.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
branch coverage should be accurate
Screenshots

(I can't get the tooltip in the screenshot, but it says "branch not covered")
Builder:
@angular-builders/jest^7.1.2Libraries
angular-devkit/build-angular:^0.10.7I'm not sure it would be smart to add a dependency on alpha version.
Let's wait at least until RC is released and then I'll update.
If it's a deal breaker, I can create an alpha version of jest builder that depends on alpha version of jest-preset-angular.
Would be great idea to make also a Alpha version, as it influences the coverage report quite a lot!
Use version 7.3.0-alpha.1. It can be installed with npm i -D @angular-builders/jest@jest-preset-alpha
Have tried version jest-preset-alpha, it works perfectly 馃憤
Is there anything I need to change in the config, because first it took around 45-50sec to run, and now I killed it after 10 minutes.
Package.json:
Angular 7.2.0
"@angular-builders/jest": "7.3.0-alpha.1",
"ts-jest": "23.10.5",
"jest": "23.6.0",
"jest-junit": "6.0.1",
Angular.json:
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"no-cache": true
}
}
Not that I'm aware of... Can you create minimal reproduction?
There is one pref fixing PR upcoming: kulshekhar/ts-jest#940
Most helpful comment
I'm not sure it would be smart to add a dependency on alpha version.
Let's wait at least until RC is released and then I'll update.
If it's a deal breaker, I can create an alpha version of
jest builderthat depends on alpha version ofjest-preset-angular.