diff --git a/lib/v8-to-istanbul.js b/lib/v8-to-istanbul.js index 30c50da2..1c53d0eb 100644 --- a/lib/v8-to-istanbul.js +++ b/lib/v8-to-istanbul.js @@ -82,8 +82,14 @@ module.exports = class V8ToIstanbul { startCol, endCol } = this._maybeRemapStartColEndCol(range) - const lines = this.source.lines.filter(line => { + // Upstream tooling can provide a block with the functionName + // (empty-report), this will result in a report that has all + // lines zeroed out. + if (block.functionName === '(empty-report)') { + line.count = 0 + return true + } return startCol <= line.endCol && endCol >= line.startCol }) const startLineInstance = lines[0]