Skip to content

Commit

Permalink
test: remove AbortController and AbortSignal polyfills (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored Feb 13, 2024
1 parent 07b6259 commit bb0e1e1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions test/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1046,25 +1046,6 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
});

it("bubbles up AbortError if the request is aborted", () => {
// AbortSignal and AbortController do not exist on
// Node < 15. The main parts of their API have been
// reproduced in the mocks below.
class AbortSignal {
abort = () => {
const e = new Error("");
e.name = "AbortError";
throw e;
};

addEventListener = () => {};
}

class AbortController {
abort = () => {
this.signal.abort();
};
signal = new AbortSignal();
}
const abortController = new AbortController();
const mock = fetchMock.sandbox().post(
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/tags/v1.0.0",
Expand Down

0 comments on commit bb0e1e1

Please sign in to comment.