(reason: any)
| 437 | |
| 438 | let expectedRejectionCaught = false |
| 439 | const handleRejection = (reason: any) => { |
| 440 | if (reason?.message === expectedMessage) { |
| 441 | expectedRejectionCaught = true |
| 442 | return // Don't re-throw, this is expected |
| 443 | } |
| 444 | // Re-throw other rejections |
| 445 | reject(reason) |
| 446 | } |
| 447 | |
| 448 | if (originalUnhandledRejection) { |
| 449 | process.removeListener(`unhandledRejection`, originalUnhandledRejection) |
nothing calls this directly
no outgoing calls
no test coverage detected