Skip to content

Commit

Permalink
Fix use of --all when instrumentation is disabled
Browse files Browse the repository at this point in the history
This allows the use of --all with `babel-transform-istanbul`, for
instance.
  • Loading branch information
Whitney Young committed Jan 6, 2017
1 parent 093963b commit 384aef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/instrumenters/noop.js
Expand Up @@ -3,12 +3,12 @@ var readInitialCoverage = require('istanbul-lib-instrument').readInitialCoverage

function NOOP () {
return {
instrumentSync: function (code) {
instrumentSync: function (code, filename) {
var extracted = readInitialCoverage(code)
if (extracted) {
this.fileCoverage = new FileCoverage(extracted.coverageData)
} else {
this.fileCoverage = null
this.fileCoverage = new FileCoverage(filename)
}
return code
},
Expand Down

0 comments on commit 384aef8

Please sign in to comment.