From 837ff4ba597255ce83dda895f8c93eb0a6b9e030 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 24 Mar 2017 12:13:13 -0400 Subject: [PATCH] lib: remove an unnecessary coverage check PR-URL: https://github.com/nodejs/node/pull/12023 Fixes: https://github.com/nodejs/node/issues/11445 Refs: f65a48fc8f89071dc326e4d84646b5cbcfa8eca7 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann --- lib/internal/process/write-coverage.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/internal/process/write-coverage.js b/lib/internal/process/write-coverage.js index 6bbc59a6e981be..50c55200d2185f 100644 --- a/lib/internal/process/write-coverage.js +++ b/lib/internal/process/write-coverage.js @@ -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`;