Browse Source

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 <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
canary-base
Refael Ackermann 7 years ago
parent
commit
b8d532c4bd
No known key found for this signature in database GPG Key ID: CD704BD80FDDDB64
  1. 5
      test/common/index.js

5
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);
}

Loading…
Cancel
Save