(shouldAbort: boolean)
| 338 | } |
| 339 | |
| 340 | async function outerCaller(shouldAbort: boolean): Promise<{ result: string; wasAborted: boolean }> { |
| 341 | try { |
| 342 | const result = await callerWithUnwrap(shouldAbort) |
| 343 | return { result, wasAborted: false } |
| 344 | } catch (error) { |
| 345 | if (isAbortError(error)) { |
| 346 | return { result: '', wasAborted: true } |
| 347 | } |
| 348 | throw error // Rethrow non-abort errors |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | it('returns result on success', async () => { |
| 353 | const { result, wasAborted } = await outerCaller(false) |
no test coverage detected