(stream: Readable)
| 6 | import { Readable } from "node:stream" |
| 7 | |
| 8 | const readStream = (stream: Readable) => |
| 9 | Effect.promise(async () => { |
| 10 | let text = "" |
| 11 | for await (const chunk of stream) { |
| 12 | text += typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8") |
| 13 | } |
| 14 | return text |
| 15 | }) |
| 16 | |
| 17 | describe("NodeHttpPlatform", () => { |
| 18 | it.effect("fileResponse reads exact bytesToRead", () => |
no test coverage detected