test: allow globals to be whitelisted
This commit adds a function to test/common.js that allows additional global variables to be whitelisted in a test. PR-URL: https://github.com/nodejs/node/pull/7826 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
99f45b2476
commit
f18b1c91b8
@ -345,6 +345,11 @@ if (global.Symbol) {
|
||||
knownGlobals.push(Symbol);
|
||||
}
|
||||
|
||||
function allowGlobals(...whitelist) {
|
||||
knownGlobals = knownGlobals.concat(whitelist);
|
||||
}
|
||||
exports.allowGlobals = allowGlobals;
|
||||
|
||||
function leakedGlobals() {
|
||||
var leaked = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user