wallet-core/node_modules/nyc/lib/instrumenters/noop.js
2017-05-28 00:40:43 +02:00

22 lines
556 B
JavaScript

var FileCoverage = require('istanbul-lib-coverage').classes.FileCoverage
var readInitialCoverage = require('istanbul-lib-instrument').readInitialCoverage
function NOOP () {
return {
instrumentSync: function (code, filename) {
var extracted = readInitialCoverage(code)
if (extracted) {
this.fileCoverage = new FileCoverage(extracted.coverageData)
} else {
this.fileCoverage = null
}
return code
},
lastFileCoverage: function () {
return this.fileCoverage
}
}
}
module.exports = NOOP