From a1abf62cc31110a136330ee654ed68bf34304252 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Mon, 4 Sep 2017 11:31:32 -0400 Subject: [PATCH] test: allow adding known-globals through ENV PR-URL: https://github.com/nodejs/node/pull/15187 Refs: https://youtrack.jetbrains.com/issue/WEB-27528 Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- test/common/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/common/index.js b/test/common/index.js index f2dfa61d16b27a..7f1d8907acdf4c 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -412,6 +412,11 @@ if (global.Symbol) { knownGlobals.push(Symbol); } +if (process.env.NODE_TEST_KNOWN_GLOBALS) { + const knownFromEnv = process.env.NODE_TEST_KNOWN_GLOBALS.split(','); + allowGlobals(...knownFromEnv); +} + function allowGlobals(...whitelist) { knownGlobals = knownGlobals.concat(whitelist); }