Browse Source

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>
v7.x
cjihrig 9 years ago
parent
commit
f18b1c91b8
  1. 5
      test/common.js

5
test/common.js

@ -345,6 +345,11 @@ if (global.Symbol) {
knownGlobals.push(Symbol); knownGlobals.push(Symbol);
} }
function allowGlobals(...whitelist) {
knownGlobals = knownGlobals.concat(whitelist);
}
exports.allowGlobals = allowGlobals;
function leakedGlobals() { function leakedGlobals() {
var leaked = []; var leaked = [];

Loading…
Cancel
Save