diff --git a/index.js b/index.js index 4a989749a..0933fa15f 100755 --- a/index.js +++ b/index.js @@ -407,12 +407,16 @@ function coverageFinder () { } NYC.prototype._getCoverageMapFromAllCoverageFiles = function () { + var _this = this var map = libCoverage.createCoverageMap({}) this.loadReports().forEach(function (report) { map.merge(report) }) map.data = this.sourceMaps.remapCoverage(map.data) + map.filter(function (filename) { + return _this.exclude.shouldInstrument(filename) + }) return map }