parcoursup/node_modules/nyc/lib/instrumenters/noop.js

23 lines
449 B
JavaScript
Raw Normal View History

2023-03-05 13:23:23 +01:00
'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