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 499750f

Browse filesBrowse files
aduh95BethGriggs
authored andcommitted
test: update list of known globals
This is important to allow to run v16 doc tests on more recent versions. PR-URL: #45255 Refs: https://github.com/nodejs/node/actions/runs/3356902660/jobs/5562322617 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
1 parent 03dcbe3 commit 499750f
Copy full SHA for 499750f

File tree

Expand file treeCollapse file tree

1 file changed

+32
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+32
-8
lines changed
Open diff view settings
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+32-8Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ if (global.gc) {
291291
knownGlobals.push(global.gc);
292292
}
293293

294+
if (global.Performance) {
295+
knownGlobals.push(global.Performance);
296+
}
294297
if (global.performance) {
295298
knownGlobals.push(global.performance);
296299
}
@@ -301,16 +304,16 @@ if (global.PerformanceMeasure) {
301304
knownGlobals.push(global.PerformanceMeasure);
302305
}
303306

304-
if (global.fetch) {
305-
knownGlobals.push(
306-
global.fetch,
307-
global.FormData,
308-
global.Request,
309-
global.Response,
310-
global.Headers,
311-
);
307+
// TODO(@ethan-arrowood): Similar to previous checks, this can be temporary
308+
// until v16.x is EOL. Once all supported versions have structuredClone we
309+
// can add this to the list above instead.
310+
if (global.structuredClone) {
311+
knownGlobals.push(global.structuredClone);
312312
}
313313

314+
if (global.fetch) {
315+
knownGlobals.push(fetch);
316+
}
314317
if (hasCrypto && global.crypto) {
315318
knownGlobals.push(global.crypto);
316319
knownGlobals.push(global.Crypto);
@@ -320,6 +323,27 @@ if (hasCrypto && global.crypto) {
320323
if (global.CustomEvent) {
321324
knownGlobals.push(global.CustomEvent);
322325
}
326+
if (global.ReadableStream) {
327+
knownGlobals.push(
328+
global.ReadableStream,
329+
global.ReadableStreamDefaultReader,
330+
global.ReadableStreamBYOBReader,
331+
global.ReadableStreamBYOBRequest,
332+
global.ReadableByteStreamController,
333+
global.ReadableStreamDefaultController,
334+
global.TransformStream,
335+
global.TransformStreamDefaultController,
336+
global.WritableStream,
337+
global.WritableStreamDefaultWriter,
338+
global.WritableStreamDefaultController,
339+
global.ByteLengthQueuingStrategy,
340+
global.CountQueuingStrategy,
341+
global.TextEncoderStream,
342+
global.TextDecoderStream,
343+
global.CompressionStream,
344+
global.DecompressionStream,
345+
);
346+
}
323347

324348
function allowGlobals(...allowlist) {
325349
knownGlobals = knownGlobals.concat(allowlist);

0 commit comments

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