aboutsummaryrefslogtreecommitdiff
path: root/test/regression/issue/02367.test.ts
blob: c9746b7e04f0c14d97cde92c5122182ab4d155a2 (plain) (blame)
1
2
3
4
5
6
import { test, expect } from "bun:test";

test("should not be able to parse json from empty body", () => {
  expect(async () => await new Response().json()).toThrow(SyntaxError);
  expect(async () => await new Request("http://example.com/").json()).toThrow(SyntaxError);
});