()
| 22 | } |
| 23 | |
| 24 | async function testPipeTo() { |
| 25 | const written = []; |
| 26 | const writer = { |
| 27 | async write(chunk) { written.push(chunk); }, |
| 28 | async end() { return written.length; }, |
| 29 | async fail() {}, |
| 30 | }; |
| 31 | |
| 32 | const totalBytes = await pipeTo(from('async-pipe-data'), writer); |
| 33 | assert.strictEqual(totalBytes, 15); // 'async-pipe-data' = 15 UTF-8 bytes |
| 34 | assert.ok(written.length > 0); |
| 35 | } |
| 36 | |
| 37 | async function testPipeToPreventClose() { |
| 38 | let endCalled = false; |
no test coverage detected
searching dependent graphs…