Skip to content
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

Closed

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 12, 2020

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 12, 2020
@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2020
@jasnell jasnell changed the title test: check for AbortControll existence test: check for AbortController existence Oct 12, 2020
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>
@jasnell jasnell force-pushed the test-common-conditional-abortcontroller branch from 2e5df10 to 2fa6e3a Compare October 12, 2020 15:39
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@Trott Trott left a 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.

@jasnell
Copy link
Member Author

jasnell commented Oct 13, 2020

Added a comment

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 13, 2020
@jasnell
Copy link
Member Author

jasnell commented Oct 13, 2020

There's really no reason for this to wait. 👍🏻 to fast-track

@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 14, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 14, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@jasnell
Copy link
Member Author

jasnell commented Oct 15, 2020

Landed in 6751b6d

@jasnell jasnell closed this Oct 15, 2020
jasnell added a commit that referenced this pull request Oct 15, 2020
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>
BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
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>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants