(name)
| 6 | const expected = []; |
| 7 | |
| 8 | function testHook(name) { |
| 9 | const hook = promiseHooks[name]; |
| 10 | const error = new Error(`${name} error`); |
| 11 | |
| 12 | const stop = hook(common.mustCall(() => { |
| 13 | stop(); |
| 14 | throw error; |
| 15 | })); |
| 16 | |
| 17 | expected.push(error); |
| 18 | } |
| 19 | |
| 20 | process.on('uncaughtException', common.mustCall((received) => { |
| 21 | assert.strictEqual(received, expected.shift()); |
no test coverage detected
searching dependent graphs…