Skip to content
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

Merged
merged 4 commits into from Sep 15, 2021

Conversation

Quramy
Copy link
Contributor

@Quramy Quramy commented Sep 29, 2020

What I did

  • Add includeRawScriptCoverage option to include full V8 precise coverage entry to result of page.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

@Quramy Quramy force-pushed the full-v8-coverage-result branch 2 times, most recently from ca19cef to d083296 Compare September 29, 2020 18:42
@Quramy
Copy link
Contributor Author

Quramy commented Sep 29, 2020

hmmm, extra test CI job was failed. 🤔 Tell me how to fix it ?

Copy link
Collaborator

@jackfranklin jackfranklin left a 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?

@Quramy
Copy link
Contributor Author

Quramy commented Oct 7, 2020

@mathiasbynens @jackfranklin Can you please merge this?

@Quramy
Copy link
Contributor Author

Quramy commented Oct 28, 2020

How about this? Let me know if anything needs to be fixed !

Copy link
Contributor

@jschfflr jschfflr left a 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!

@jschfflr jschfflr enabled auto-merge (squash) September 11, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants