-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: check for AbortController existence #35616
test: check for AbortController existence #35616
Conversation
Running tests comparitively on older versions of Node.js that do not have AbortController can be a pain. Only add the AbortController to knownGlobals if it actually exists. Signed-off-by: James M Snell <jasnell@gmail.com>
2e5df10
to
2fa6e3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM although I wonder if there should be a comment to make it clear why this is being done so that someone who is puzzled by it and wants to remove it 3 years from now can do so without concern, since presumably we only care about running current test code on supported versions. Another possibility is to add in specific version-sniffing which is usually an anti-pattern but probably makes sense in this particular case as it will be self-documenting why this is being done.
Added a comment |
There's really no reason for this to wait. 👍🏻 to fast-track |
Landed in 6751b6d |
Running tests comparitively on older versions of Node.js that do not have AbortController can be a pain. Only add the AbortController to knownGlobals if it actually exists. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #35616 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Running tests comparitively on older versions of Node.js that do not have AbortController can be a pain. Only add the AbortController to knownGlobals if it actually exists. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #35616 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Running tests comparitively on older versions of Node.js that do not have AbortController can be a pain. Only add the AbortController to knownGlobals if it actually exists. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#35616 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Running tests comparitively on older versions of Node.js that
do not have AbortController can be a pain. Only add the
AbortController to knownGlobals if it actually exists.
Signed-off-by: James M Snell jasnell@gmail.com
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes