Skip to content

Commit bb0e1e1

Browse files
authored
test: remove AbortController and AbortSignal polyfills (#676)
1 parent 07b6259 commit bb0e1e1

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

Diff for: test/request.test.ts

-19
Original file line numberDiff line numberDiff line change
@@ -1046,25 +1046,6 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
10461046
});
10471047

10481048
it("bubbles up AbortError if the request is aborted", () => {
1049-
// AbortSignal and AbortController do not exist on
1050-
// Node < 15. The main parts of their API have been
1051-
// reproduced in the mocks below.
1052-
class AbortSignal {
1053-
abort = () => {
1054-
const e = new Error("");
1055-
e.name = "AbortError";
1056-
throw e;
1057-
};
1058-
1059-
addEventListener = () => {};
1060-
}
1061-
1062-
class AbortController {
1063-
abort = () => {
1064-
this.signal.abort();
1065-
};
1066-
signal = new AbortSignal();
1067-
}
10681049
const abortController = new AbortController();
10691050
const mock = fetchMock.sandbox().post(
10701051
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/tags/v1.0.0",

0 commit comments

Comments
 (0)