(controller)
| 55 | test('handles streaming responses correctly', async () => { |
| 56 | const stream = new ReadableStream({ |
| 57 | start(controller) { |
| 58 | controller.enqueue(new TextEncoder().encode('chunk1')); |
| 59 | controller.enqueue(new TextEncoder().encode('chunk2')); |
| 60 | controller.close(); |
| 61 | }, |
| 62 | }); |
| 63 | const streamingResponse = new Response(stream); |
| 64 |