test: add AbortController to knownGlobals
PR-URL: https://github.com/nodejs/node/pull/53020 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
parent
559212e64c
commit
eaa839ed8a
@ -280,6 +280,7 @@ function platformTimeout(ms) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let knownGlobals = [
|
let knownGlobals = [
|
||||||
|
AbortController,
|
||||||
atob,
|
atob,
|
||||||
btoa,
|
btoa,
|
||||||
clearImmediate,
|
clearImmediate,
|
||||||
@ -292,15 +293,6 @@ let knownGlobals = [
|
|||||||
queueMicrotask,
|
queueMicrotask,
|
||||||
];
|
];
|
||||||
|
|
||||||
// TODO(@jasnell): This check can be temporary. AbortController is
|
|
||||||
// not currently supported in either Node.js 12 or 10, making it
|
|
||||||
// difficult to run tests comparatively on those versions. Once
|
|
||||||
// all supported versions have AbortController as a global, this
|
|
||||||
// check can be removed and AbortController can be added to the
|
|
||||||
// knownGlobals list above.
|
|
||||||
if (global.AbortController)
|
|
||||||
knownGlobals.push(global.AbortController);
|
|
||||||
|
|
||||||
if (global.gc) {
|
if (global.gc) {
|
||||||
knownGlobals.push(global.gc);
|
knownGlobals.push(global.gc);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user