Skip to content

Commit

Permalink
fix: hoist coverage variable to very top of file (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
motiz88 authored and bcoe committed Oct 16, 2016
1 parent 37a0087 commit 0225e8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/visitor.js
Expand Up @@ -474,6 +474,7 @@ function programVisitor(types, sourceFilePath = 'unknown.js', opts = {coverageVa
INITIAL: coverageNode,
HASH: T.stringLiteral(hash)
});
cv._blockHoist = 3;
path.node.body.unshift(cv);
return {
fileCoverage: coverageData,
Expand Down

0 comments on commit 0225e8c

Please sign in to comment.