fix: map paths back to original file paths #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey folks,
I like this package and it solves a lot of my code coverage problems in frontend testing!
One problem with the current implementation is that the coverage is actually measured on different files than the original ones. This works rather fine when you only measure coverage over visited files. However, it leads to problems when you e.g. work with the
nyc --all
option and you want to be precise with the covered files.While it is necessary to write the generated webpack files to disk for
v8-to-istanbul
, we actually do not need to pass the coverage data on as-is. We can convert them back to their original paths and have nice and consistent coverage data.The current proposal is kinda the idea, there are failing tests and I need some feedback from contributors who are deeper into the topic. Also, the implementation with the for loops is a bit error prone, I'd prefer a non-mutating solution here.
Would love to have this integrated. For me it's working fine!