Skip to content

Commit

Permalink
Print the __coverage__ var only when all tests are finished
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Lores committed Nov 24, 2014
1 parent 9d1f385 commit 6cfd3e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function instrument(options) {
if (!err) {
// Inject __converage__ var
self.push(code);
self.push('console.log("__coverage__=\'" + JSON.stringify(__coverage__) + "\';");');
self.push('after(function(){console.log("__coverage__=\'" + JSON.stringify(__coverage__) + "\';");});');
} else {
self.emit('error', err);
}
Expand Down

0 comments on commit 6cfd3e8

Please sign in to comment.