6d29f54642206bcde50c1df42ebe726d14568215.svn-base
517 Bytes
const { FileCoverage } = require('istanbul-lib-coverage').classes
const { readInitialCoverage } = require('istanbul-lib-instrument')
function NOOP () {
return {
instrumentSync (code, filename) {
const extracted = readInitialCoverage(code)
if (extracted) {
this.fileCoverage = new FileCoverage(extracted.coverageData)
} else {
this.fileCoverage = null
}
return code
},
lastFileCoverage () {
return this.fileCoverage
}
}
}
module.exports = NOOP