Skip to content

Commit

Permalink
test: allow adding known-globals through ENV
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
refack authored and MylesBorins committed Oct 25, 2017
1 parent ab014d4 commit 48943e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,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);
}
Expand Down

0 comments on commit 48943e9

Please sign in to comment.