Skip to content

Commit

Permalink
lib: remove an unnecessary coverage check
Browse files Browse the repository at this point in the history
PR-URL: #12023
Fixes: #11445
Refs: f65a48f
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
  • Loading branch information
Fishrock123 authored and MylesBorins committed Mar 28, 2017
1 parent 2102504 commit 837ff4b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/internal/process/write-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ const fs = require('fs');
const mkdirSync = fs.mkdirSync;
const writeFileSync = fs.writeFileSync;

var isWritingCoverage = false;
function writeCoverage() {
if (isWritingCoverage || !global.__coverage__) {
if (!global.__coverage__) {
return;
}
isWritingCoverage = true;

const dirname = path.join(path.dirname(process.execPath), '.coverage');
const filename = `coverage-${process.pid}-${Date.now()}.json`;
Expand Down

0 comments on commit 837ff4b

Please sign in to comment.