karma-coverage-istanbul-reporter
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.0.4"></a> | ||
## [2.0.4](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v2.0.3...v2.0.4) (2018-09-08) | ||
### Bug Fixes | ||
* handle source roots being undefined on windows ([8eba911](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/commit/8eba911)), closes [#55](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/55) | ||
<a name="2.0.3"></a> | ||
@@ -7,0 +17,0 @@ ## [2.0.3](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v2.0.2...v2.0.3) (2018-09-01) |
{ | ||
"name": "karma-coverage-istanbul-reporter", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "A karma reporter that uses the latest istanbul 1.x APIs (with full sourcemap support) to report coverage.", | ||
@@ -5,0 +5,0 @@ "main": "src/reporter.js", |
@@ -19,3 +19,3 @@ const path = require('path'); | ||
// Workaround for https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/9 | ||
if (isWin) { | ||
if (isWin && filePath) { | ||
return filePath.replace(/\//g, '\\'); | ||
@@ -42,5 +42,4 @@ } | ||
return Object.assign({}, sourceMap, { | ||
const result = Object.assign({}, sourceMap, { | ||
file: fixPathSeparators(sourceMap.file), | ||
sourceRoot, | ||
sources: (sourceMap.sources || []).map(source => { | ||
@@ -54,2 +53,8 @@ source = fixWebpackFilePath(source); | ||
}); | ||
if (sourceRoot) { | ||
result.sourceRoot = sourceRoot; | ||
} | ||
return result; | ||
} | ||
@@ -56,0 +61,0 @@ |
25863
271