c8 reporting 100% coverage on function which throws
See original GitHub issue- Version: v16.13.2
- Platform: Darwin Aarons-MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_6
I have a project that I am refactoring, and c8 is reporting incorrect coverage for the files.
This is the coverage I have when I am trying to view test coverage:
The test that is being run:
If needed, this is the project: monorepo-coverage
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
c8 | Yarn - Package Manager
--skip-full, do not show files with 100% statement, branch, and function coverage, boolean, false ; --check-coverage, check whether coverage is within thresholds ...
Read more >c8js - npm Package Health Analysis - Snyk
A modern, asynchronous Node.js API for c8. Visit Snyk Advisor to see a full health score report for c8js, including popularity, security, ...
Read more >c8 - npm
output coverage reports using Node.js' built in coverage. ... do not show files with 100% statement, branch, and function coverage, boolean ...
Read more >Code Coverage - Test Runner - Modern Web
So 100% code coverage only means that every line you have in your code was executed at least once after all your tests...
Read more >Expect throwError not getting coverage - Stack Overflow
You should have two test cases at least. One test throws an error, and one test is normal. E.g.. index.ts :
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 Free
Top 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
This is most likely an underlying issue with
v8
vs.,c8
. Will need to dig into raw output to actually see what’s happening.let me know if there’s anything more I can provide