Upgrade jest-preset-angular version to the latest
See original GitHub issueDescribe 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:
- Run tests
- See inaccurate branch coverage
Expected behavior
branch coverage should be accurate
Screenshots
(I can’t get the tooltip in the screenshot, but it says “branch not covered”)
Builder:
- The name of the builder:
@angular-builders/jest
- The version of the builder:
^7.1.2
Libraries
angular-devkit/build-angular
:^0.10.7
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
jest-preset-angular - npm
Jest preset configuration for Angular projects. Latest version: 12.2.3, last published: a month ago. Start using jest-preset-angular in your ...
Read more >Angular >=13 | jest-preset-angular - GitHub Pages
Starting from v11.0.0, jest-preset-angular introduces a few extra changes to be ... Upgrade the project to Angular 13 following https://update.angular.io/.
Read more >thymikee/jest-preset-angular - GitHub
Jest configuration preset for Angular projects. Contribute to thymikee/jest-preset-angular development by creating an account on GitHub.
Read more >jest-preset-angular | Yarn - Package Manager
By default, if skipLibCheck is not defined in tsconfig, jest-preset-angular will set it to true . If one wants to have it as...
Read more >Integrating Jest with latest angular version - DEV Community
Integrating Jest with latest angular version · If you are migrating from lower angular version using ng upgrade then except above piece of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 builder
that depends on alpha version ofjest-preset-angular
.There is one pref fixing PR upcoming: kulshekhar/ts-jest#940