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.

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: Screenshot 2022-01-28 at 17 28 32

The test that is being run: Screenshot 2022-01-28 at 17 29 21

If needed, this is the project: monorepo-coverage

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bcoecommented, Mar 23, 2022

This is most likely an underlying issue with v8 vs., c8. Will need to dig into raw output to actually see what’s happening.

0reactions
gear4scommented, Mar 23, 2022

let me know if there’s anything more I can provide

Read more comments on GitHub >

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

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