()
| 307 | // ============================================================================= |
| 308 | |
| 309 | async function testSignalAlreadyAborted() { |
| 310 | async function* gen() { |
| 311 | yield [Buffer.from('should not reach')]; |
| 312 | } |
| 313 | |
| 314 | const readable = toReadable(gen(), { signal: AbortSignal.abort() }); |
| 315 | |
| 316 | await assert.rejects(async () => { |
| 317 | // eslint-disable-next-line no-unused-vars |
| 318 | for await (const chunk of readable) { |
| 319 | // Should not receive any data |
| 320 | } |
| 321 | }, { name: 'AbortError' }); |
| 322 | assert.ok(readable.destroyed); |
| 323 | } |
| 324 | |
| 325 | // ============================================================================= |
| 326 | // fromStreamIter: options validation |
no test coverage detected