-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
how to generate code coverage against the source files instead of the bundle file #62
Comments
@emelens were you able to find any solution for this by any chance? |
Bump this issue |
This is much needed can anyone please share your thoughts here ? @bcoe @dword-design When do you plan to merge your above changes which can enable source map support here ? |
@278kunal Not sure yet. The solution in the PR works for me but don't know if it works for others. What do you or others say? |
@dword-design I cloned your fork and tried getting coverage via Puppeteer of a locally running React application bundled via webpack. But unfortunately I am only seeing coverage for the webpack transpiled code. Is there a way we can tell PTI to look for source maps when passing to v8-to-istanbul ? |
@278kunal Ah yeah I guess it's because the PR only extracts source maps from webpack bundled code. I extract them from the base64. Where else could PTI find source maps? |
Two suggestions here if you're using webpack:
If the second option is a possibility, it works very nicely! |
@danvk Sorry if this is more of an Istanbul related question, I'm just starting to use it. For the second option, after getting the |
@a4vg could you please share some insights on how you've generated the istanbul report from the coverage once retrieved from within the page? @danvk it seems like this solution would not allow to collect coverage data across multiple page reloads (like with |
@a4vg yes, put that object in a JSON file in |
Hi,
Could someone please advise if code coverage can be generated for reactjs source code instead of the bundle generated by babel.
I was wondering if source maps can be used to generate code coverage
thanks
The text was updated successfully, but these errors were encountered: