Skip to content

Commit

Permalink
chore: Stop constructing FileCoverage in noop instrumenter.
Browse files Browse the repository at this point in the history
This makes the behavior consistent with the real instrumenter which just
provides raw data.
  • Loading branch information
coreyfarrell committed Aug 1, 2019
1 parent 57832e1 commit 990bdec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/instrumenters/noop.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
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)
this.fileCoverage = extracted.coverageData
} else {
this.fileCoverage = null
}
Expand Down

0 comments on commit 990bdec

Please sign in to comment.