()
| 190 | |
| 191 | // PipeTo preventFail option |
| 192 | async function testPipeToPreventFail() { |
| 193 | let failCalled = false; |
| 194 | const writer = { |
| 195 | write() {}, |
| 196 | fail() { failCalled = true; }, |
| 197 | }; |
| 198 | // eslint-disable-next-line require-yield |
| 199 | async function* failingSource() { |
| 200 | throw new Error('boom'); |
| 201 | } |
| 202 | await assert.rejects( |
| 203 | () => pipeTo(failingSource(), writer, { preventFail: true }), |
| 204 | { message: 'boom' }, |
| 205 | ); |
| 206 | assert.strictEqual(failCalled, false); |
| 207 | } |
| 208 | |
| 209 | // PipeToSync preventClose option |
| 210 | async function testPipeToSyncPreventClose() { |
no test coverage detected
searching dependent graphs…