From 7512da9c1aa174e6f088ccd2f7b26778cb9bf004 Mon Sep 17 00:00:00 2001 From: swdyh Date: Sat, 10 Feb 2024 21:46:07 +0900 Subject: [PATCH] fix bun test example --- getting-started/bun.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getting-started/bun.md b/getting-started/bun.md index 1d2d0a30..471cb90c 100644 --- a/getting-started/bun.md +++ b/getting-started/bun.md @@ -59,6 +59,7 @@ export default app // [!code --] export default { // [!code ++] port: 3000, // [!code ++] fetch: app.fetch, // [!code ++] + request: app.request, // [!code ++] } // [!code ++] ``` @@ -147,8 +148,7 @@ import app from '.' describe('My first test', () => { it('Should return 200 Response', async () => { - const req = new Request('http://localhost/') - const res = await app.fetch(req) + const res = await app.request('/') expect(res.status).toBe(200) }) })