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
feat(coverage): option for raw V8 script coverage #6454
Conversation
ca19cef
to
d083296
Compare
|
d083296
to
ff16699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! This LGTM.
@mathiasbynens wdyt?
@mathiasbynens @jackfranklin Can you please merge this? |
How about this? Let me know if anything needs to be fixed ! |
03a4ca1
to
d4b17bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me!
What I did
includeRawScriptCoverage
option to include full V8 precise coverage entry to result ofpage.coverage.stopJSCoverage()
Motivation
It's related to issue #985 . I want to map Puppeteer's coverage result with source-map with https://github.com/istanbuljs/v8-to-istanbul . But The Puppeteer's coverage result's range objects are edited by
convertToDisjointRanges
function and v8-to-istanbul can't map .So, I want this option to get V8 raw coverage result, whose functions' ranges are not joined.
[FYI] The similar method in Praywrite returns raw V8 coverage result. https://playwright.dev/#version=v1.4.2&path=docs%2Fapi.md&q=chromiumcoveragestopjscoverage