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: nodejs#7826
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig committed Nov 23, 2016
1 parent 54c38eb commit fd97cf0
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 fd97cf0

Please sign in to comment.