Skip to content

Commit

Permalink
test: allow globals to be whitelisted
Browse files Browse the repository at this point in the history
This commit adds a function to test/common.js that allows
additional global variables to be whitelisted in a test.

PR-URL: #7826
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Dec 13, 2016
1 parent 7b4268b commit 02e8187
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ if (global.Symbol) {
knownGlobals.push(Symbol);
}

function allowGlobals() {
knownGlobals = knownGlobals.concat(Array.from(arguments));
}
exports.allowGlobals = allowGlobals;

function leakedGlobals() {
var leaked = [];

Expand Down

0 comments on commit 02e8187

Please sign in to comment.