From 4b7132cf5b71924e966d9c56bdc17497071031a4 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 Fixes: https://github.com/nodejs/node/issues/11445 Refs: f65a48fc8f89071dc326e4d84646b5cbcfa8eca7 --- 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`;