Incorrect Coverage
See original GitHub issueThe current coverage being generated does not reflect the source. At the moment, since the test files are so simple, it’s hard to notice. However, when a more complex class and test spec is introduced, we get errors when the coverage points to lines that don’t match up to the source file.
I believe the problem is that rollup-plugin-stanbul
is instrumenting the wrong file. I’ve tried with no luck to try and get either the karma-remap-istanbul
or the karma-remap-coverage
working to compensate.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Incorrect Jest coverage · Issue #3854 · swc-project/swc - GitHub
When using @swc/jest to transpile ts to commonjs and running jest --coverage certain branches are shown as not covered (console logging in ...
Read more >False coverage rate - Wikipedia
In statistics, a false coverage rate (FCR) is the average rate of false coverage, i.e. not covering the true parameters, among the selected...
Read more >Incorrect coverage for Overall Code on feature branch
Issue summary: A feature branch containing small changes is not picking up the old code coverage for Overall Code.
Read more >Incorrect coverage number reported by codecov - Bug Fixes
The covered/uncovered seems to be correct visually (if we got by green and red highlighting). It's just that the counting of lines seem...
Read more >Code coverage report seems incorrect. Why? - Google Groups
I use Jacoco with ant and then use sonar to reuse jacoco.exec to show the result. But the result seems incorrect. What's wrong...
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
Thanks @marcoturi, it’s working now after I updated my repository to match.
Quick note if anybody finds this issue and is still having problems: it is critical that
"istanbul-instrumenter-loader": "0.2.0"
is set in package.json. A regularnpm install --save-dev istanbul-instrumenter-loader
will save a later version beyond 0.2.0 that causes similarCannot read property 'text' of undefined
errors.Sure, this is the relevant configuration in karma.conf.js: