blob: 6b27caf3ef1a57c8beaebda9b5c653c6cf207f44 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import { test, expect } 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", {}]);
}
});
|