karma-coverage-istanbul-reporter
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "karma-coverage-istanbul-reporter", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A karma reporter that uses the latest istanbul 1.x APIs (with full sourcemap support) to report coverage.", | ||
@@ -36,3 +36,3 @@ "main": "src/reporter.js", | ||
"dependencies": { | ||
"istanbul-api": "^1.1.1" | ||
"istanbul-api": "^1.1.7" | ||
}, | ||
@@ -54,3 +54,3 @@ "devDependencies": { | ||
"ts-loader": "^2.0.0", | ||
"tslint": "^4.3.1", | ||
"tslint": "^5.1.0", | ||
"tslint-loader": "^3.3.0", | ||
@@ -57,0 +57,0 @@ "typescript": "^2.1.0", |
@@ -50,2 +50,5 @@ # karma-coverage-istanbul-reporter | ||
// stop istanbul outputting messages like `File [${filename}] ignored, nothing could be mapped` | ||
skipFilesWithNoCoverage: true, | ||
// Most reporters accept additional config options. You can pass these through the `report-config` option | ||
@@ -52,0 +55,0 @@ 'report-config': { |
@@ -53,3 +53,12 @@ 'use strict'; | ||
} | ||
coverageMap.addFileCoverage(fileCoverage); | ||
if ( | ||
coverageIstanbulReporter.skipFilesWithNoCoverage && | ||
Object.keys(fileCoverage.statementMap).length === 0 && | ||
Object.keys(fileCoverage.fnMap).length === 0 && | ||
Object.keys(fileCoverage.branchMap).length === 0 | ||
) { | ||
log.debug(`File [${filename}] ignored, nothing could be mapped`); | ||
} else { | ||
coverageMap.addFileCoverage(fileCoverage); | ||
} | ||
}); | ||
@@ -56,0 +65,0 @@ |
12472
101
101
Updatedistanbul-api@^1.1.7