question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade jest-preset-angular version to the latest

See original GitHub issue

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:

  1. Run tests
  2. See inaccurate branch coverage

Expected behavior

branch coverage should be accurate

Screenshots

screen shot 2018-12-19 at 9 35 45 pm

(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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
just-jebcommented, Dec 23, 2018

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 of jest-preset-angular.

0reactions
imcottoncommented, Jan 15, 2019

There is one pref fixing PR upcoming: kulshekhar/ts-jest#940

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found