mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
12 lines
315 B
TypeScript
12 lines
315 B
TypeScript
import { expect, test } from "bun:test";
|
|
|
|
test("can read json() from request", async () => {
|
|
for (let i = 0; i < 10; i++) {
|
|
const request = new Request("http://example.com/", {
|
|
method: "PUT",
|
|
body: '[1,2,"hello",{}]',
|
|
});
|
|
expect(await request.json()).toEqual([1, 2, "hello", {}]);
|
|
}
|
|
});
|