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 committed Aug 8, 2016
1 parent 99f45b2 commit f18b1c9
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 @@ -345,6 +345,11 @@ if (global.Symbol) {
knownGlobals.push(Symbol);
}

function allowGlobals(...whitelist) {
knownGlobals = knownGlobals.concat(whitelist);
}
exports.allowGlobals = allowGlobals;

function leakedGlobals() {
var leaked = [];

Expand Down

0 comments on commit f18b1c9

Please sign in to comment.