mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
7 lines
275 B
TypeScript
7 lines
275 B
TypeScript
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);
|
|
});
|