This repository has been archived by the owner on May 15, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provide a general summary of your changes in the Title above.
There are NodeJS versions that do not provide a default
signal.reason
value, like16.14
Description
Describe your changes in detail
This small change adds an error message when aborting a request via AbortController. Previous versions of NodeJS, like
16.14
, do not provide a default signal reason, making the test fail. Newer versions, like16.20
, provide a default message.By providing an error message we can make it work as expected in all versions that support AbortController, which are
>=15
The following is an example of the failing test when running on
16.14
The
aborted
property istrue
, but still,reason
isundefined
which is not what the documentation says https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/reasonThis project only accepts pull requests related to open issues.
If suggesting a new feature or change, please discuss it in an issue first.
Motivation
Why is this change required? What issue does it resolve?
Test Conditions
Describe in detail how the changes are tested.
Include details of your testing environment, and the tests you ran to.
How does your change affect the rest of the code.
Types of changes
Check boxes that apply:
Checklist
Check boxes that apply: