We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 125c968 commit f38a3d8Copy full SHA for f38a3d8
test/retry.test.ts
@@ -323,6 +323,25 @@ describe("Automatic Retries", function () {
323
).toBeLessThan(20);
324
});
325
326
+ it("Should not throw for empty responses", async function () {
327
+ const octokit = new TestOctokit();
328
+
329
+ const response = await octokit.request("GET /test", {
330
+ request: {
331
+ responses: [
332
+ {
333
+ status: 200,
334
+ headers: {},
335
+ data: undefined,
336
+ },
337
+ ],
338
+ retries: 1,
339
340
+ });
341
342
+ expect(response.data).toBeUndefined();
343
344
345
it('Should not retry non-"Something went wrong" GraphQL errors', async function () {
346
const octokit = new TestOctokit();
347
0 commit comments