From d49b05460c372e71f3dadf3d5b11a40263fdb11a Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Sun, 27 Nov 2016 14:47:06 +0100 Subject: [PATCH] :heavy_plus_sign: add SourceMaps remapping support (close #22, close #25) * 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/istanbul-lib-instrument#23. Fixes #22, #7, karma-runner/karma-coverage#109, --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6010816..ba2e6a8 100644 --- a/index.js +++ b/index.js @@ -17,5 +17,5 @@ module.exports = function(source, sourceMap) { var that = this; return instrumenter.instrument(source, this.resourcePath, function (error, source) { that.callback(error, source, instrumenter.lastSourceMap()); - }); + }, sourceMap); };