From 994980f55300c4e214dcc1356fe33d5bd49ed5bb Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:27:42 -0500 Subject: [PATCH] test: fix test for empty response with json media type (#654) * test: add test for empty response with json media type Follow-up to #648 * test: remove duplicate test --- test/request.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/request.test.ts b/test/request.test.ts index fe39cd01a..b08eeb14e 100644 --- a/test/request.test.ts +++ b/test/request.test.ts @@ -405,12 +405,13 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w== .sandbox() .get("path:/repos/octokit-fixture-org/hello-world/contents/README.md", { status: 500, - body: undefined, + body: "", headers: { "content-type": "application/json", }, }); + expect(request).not.toThrow(); return request("GET /repos/{owner}/{repo}/contents/{path}", { headers: { accept: "content-type: application/json",