parcoursup/node_modules/nyc/lib/instrumenters/noop.js
lalBi94 7bc56c09b5 $
2023-03-05 13:23:23 +01:00

23 lines
449 B
JavaScript

'use strict'
function NOOP () {
const { readInitialCoverage } = require('istanbul-lib-instrument')
return {
instrumentSync (code, filename) {
const extracted = readInitialCoverage(code)
if (extracted) {
this.fileCoverage = extracted.coverageData
} else {
this.fileCoverage = null
}
return code
},
lastFileCoverage () {
return this.fileCoverage
}
}
}
module.exports = NOOP