(stream: ReadableStream<Uint8Array>)
| 54 | } |
| 55 | |
| 56 | async function readStreamAsString(stream: ReadableStream<Uint8Array>): Promise<string> { |
| 57 | const reader = stream.getReader(); |
| 58 | const decoder = new TextDecoder(); |
| 59 | let output = ""; |
| 60 | |
| 61 | while (true) { |
| 62 | const { done, value } = await reader.read(); |
| 63 | if (done) { |
| 64 | return output; |
| 65 | } |
| 66 | |
| 67 | output += decoder.decode(value, { stream: true }); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | describe("LocalBaseRuntime.resolvePath", () => { |
| 72 | it("should expand tilde to home directory", async () => { |
no test coverage detected