()
| 58 | } |
| 59 | |
| 60 | async function testChannelClose() { |
| 61 | const [channelA, channelB] = duplex(); |
| 62 | |
| 63 | await channelA.close(); |
| 64 | |
| 65 | // Should be able to close twice without error |
| 66 | await channelA.close(); |
| 67 | |
| 68 | // B's readable should end (A -> B direction is closed) |
| 69 | const batches = []; |
| 70 | for await (const batch of channelB.readable) { |
| 71 | batches.push(batch); |
| 72 | } |
| 73 | assert.strictEqual(batches.length, 0); |
| 74 | } |
| 75 | |
| 76 | async function testWithOptions() { |
| 77 | const [channelA, channelB] = duplex({ |
no test coverage detected
searching dependent graphs…