Skip to content

Commit 02e8187

Browse files
cjihrigMylesBorins
authored andcommitted
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: #7826 Reviewed-By: James M Snell <[email protected]>
1 parent 7b4268b commit 02e8187

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/common.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ if (global.Symbol) {
336336
knownGlobals.push(Symbol);
337337
}
338338

339+
function allowGlobals() {
340+
knownGlobals = knownGlobals.concat(Array.from(arguments));
341+
}
342+
exports.allowGlobals = allowGlobals;
343+
339344
function leakedGlobals() {
340345
var leaked = [];
341346

0 commit comments

Comments
 (0)