Files

7 lines
275 B
TypeScript
Raw Permalink Normal View History

2026-08-27 21:09:14 +00:00
import { expect, test } 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);
});