diff --git a/test/request.test.ts b/test/request.test.ts index e00e17c..a15927c 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 () => {