Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9735acc

Browse filesBrowse files
committed
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 <jasnell@gmail.com>
1 parent e561895 commit 9735acc
Copy full SHA for 9735acc

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎test/common.js‎

Copy file name to clipboardExpand all lines: test/common.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,11 @@ if (global.Symbol) {
345345
knownGlobals.push(Symbol);
346346
}
347347

348+
function allowGlobals(...whitelist) {
349+
knownGlobals = knownGlobals.concat(whitelist);
350+
}
351+
exports.allowGlobals = allowGlobals;
352+
348353
function leakedGlobals() {
349354
var leaked = [];
350355

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.