Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

When using as postLoader and Babel as loader, it don't coverage the original source #22

Closed
gartz opened this issue Apr 7, 2016 · 2 comments

Comments

@gartz
Copy link

gartz commented Apr 7, 2016

Looks like it's not reading the Babel source-map and it's creating a source-map of the Babel loader result file.

It should refer to the source-map and not to the file it self.

@gartz
Copy link
Author

gartz commented Apr 7, 2016

This project might be helpful: https://github.com/Cellarise/istanbul-coverage-source-map
So we could run the istanbul with source-map, them babel can source-map over it and it's possible to debug and coverage at same time the tests from a test watch.

@deepsweet
Copy link
Collaborator

you should not transpile covered sources with babel, it's already transpiled with isparta, see README for usage example. the problem is not in sourcemaps.

MichaReiser pushed a commit to MichaReiser/istanbul-instrumenter-loader that referenced this issue Sep 6, 2016
Pass the intermediate source map to the instrumenter that can be used
to remap the coverage report to the original source.
Requires istanbuljs-archived-repos/istanbul-lib-instrument#23.

Fixes webpack-contrib#22, webpack-contrib#7, karma-runner/karma-coverage#109,
deepsweet pushed a commit that referenced this issue Nov 27, 2016
* Upgrade to istanbul-lib-instrument

* Pass intermediate source map to instrumenter

Pass the intermediate source map to the instrumenter that can be used
to remap the coverage report to the original source.
Requires istanbuljs-archived-repos/istanbul-lib-instrument#23.

Fixes #22, #7, karma-runner/karma-coverage#109,
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants