()
| 43 | } |
| 44 | |
| 45 | async function testWriterEnd() { |
| 46 | const { writer, readable } = push(); |
| 47 | |
| 48 | const totalBytes = writer.endSync(); |
| 49 | assert.strictEqual(totalBytes, 0); |
| 50 | |
| 51 | // Calling endSync again returns byte count (idempotent when closed) |
| 52 | assert.strictEqual(writer.endSync(), 0); |
| 53 | |
| 54 | const batches = []; |
| 55 | for await (const batch of readable) { |
| 56 | batches.push(batch); |
| 57 | } |
| 58 | assert.strictEqual(batches.length, 0); |
| 59 | } |
| 60 | |
| 61 | async function testWriterFail() { |
| 62 | const { writer, readable } = push(); |
no test coverage detected
searching dependent graphs…