()
| 277 | |
| 278 | // Consumer throw causes subsequent writes to reject with consumer's error |
| 279 | async function testConsumerThrowRejectsWrites() { |
| 280 | const { writer, readable } = push({ highWaterMark: 1 }); |
| 281 | writer.writeSync('a'); |
| 282 | |
| 283 | const iter = readable[Symbol.asyncIterator](); |
| 284 | await iter.throw(new Error('consumer boom')); |
| 285 | |
| 286 | // Subsequent async writes should reject with the consumer's error |
| 287 | await assert.rejects( |
| 288 | () => writer.write('x'), |
| 289 | { message: 'consumer boom' }, |
| 290 | ); |
| 291 | } |
| 292 | |
| 293 | // end() resolves a pending read as done:true |
| 294 | async function testEndResolvesPendingRead() { |
no test coverage detected
searching dependent graphs…