()
| 522 | } |
| 523 | |
| 524 | async function outerOperationGood(): Promise<string> { |
| 525 | try { |
| 526 | return await middleOperation() |
| 527 | } catch (error) { |
| 528 | // GOOD: rethrows abort error |
| 529 | if (isAbortError(error)) { |
| 530 | throw error |
| 531 | } |
| 532 | return 'default value' |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | it('bad pattern swallows abort', async () => { |
| 537 | const result = await outerOperationBad() |
no test coverage detected