Skip to content

Commit

Permalink
feat: add possibility to filter coverage-maps (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
schutm authored and bcoe committed Aug 22, 2017
1 parent fb3ab92 commit dd40dc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dd40dc5

Please sign in to comment.