-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document some of the tradeoffs of V8 coverage (vs Babel/Istanbul coverage) #11188
Comments
Having such a comparison would be great! Looking forward to a PR, you got most of the work done :) |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
Jest supports two code coverage providers: the default
babel
provider based on Istanbul, and a newer experimental-but-encouragedv8
provider (#8596) based on V8's built-in coverage features.When I tried switching to V8 coverage, I noticed a few subtle-but-important differences that don't seem to be explicitly documented. And when I investigated further, I found that some of those differences are not a result of V8 coverage being experimental, but are caused by deeper limitations and deliberate tradeoffs that might not change in the foreseeable future.
(V8 coverage still has plenty of merit, especially in terms of performance; I'd just like to help people understand the decision they're making when they use it.)
The main differences I want to point out are:
v8-to-istanbul
and source maps to convert that report into an Istanbul-compatible format__esModule
detection shims)c8 ignore
comments that are processed on a line-by-line basis without parsingistanbul ignore
comments that are handled during AST processingI'd like to find a way to update the
coverageProvider
documentation to mention some or all of these tradeoffs, hopefully in a way that isn't too intimidating or discouraging.The text was updated successfully, but these errors were encountered: