Skip to content

Commit 994980f

Browse files
authored
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
1 parent 02b5723 commit 994980f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/request.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,12 +405,13 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
405405
.sandbox()
406406
.get("path:/repos/octokit-fixture-org/hello-world/contents/README.md", {
407407
status: 500,
408-
body: undefined,
408+
body: "",
409409
headers: {
410410
"content-type": "application/json",
411411
},
412412
});
413413

414+
expect(request).not.toThrow();
414415
return request("GET /repos/{owner}/{repo}/contents/{path}", {
415416
headers: {
416417
accept: "content-type: application/json",

0 commit comments

Comments
 (0)