From d6a50dd4cb82eb75a53ea819e6491919ea0023ec Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Mon, 28 Sep 2026 07:25:54 +0900 Subject: [PATCH] test(request): accept asynchronous body read errors --- test/request.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/request.test.ts b/test/request.test.ts index e00e17c4..a15927ca 100644 --- a/test/request.test.ts +++ b/test/request.test.ts @@ -315,7 +315,7 @@ describe('Request', () => { await closed const req = newRequest(incomingMessage) - expect(() => req.body).toThrow(TypeError) + await expect(async () => new Response(req.body).text()).rejects.toThrow() }) it('should reject with the underlying error when a complete stream was destroyed with an application error', async () => {