We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd40dc5 commit 658dba4Copy full SHA for 658dba4
index.js
@@ -367,6 +367,13 @@ NYC.prototype.writeCoverageFile = function () {
367
var coverage = coverageFinder()
368
if (!coverage) return
369
370
+ // Remove any files that should be excluded but snuck into the coverage
371
+ Object.keys(coverage).forEach(function (absFile) {
372
+ if (!this.exclude.shouldInstrument(absFile)) {
373
+ delete coverage[absFile]
374
+ }
375
+ }, this)
376
+
377
if (this.cache) {
378
Object.keys(coverage).forEach(function (absFile) {
379
if (this.hashCache[absFile] && coverage[absFile]) {
0 commit comments