()
| 27 | inherits(NoConstructor, EventEmitter); |
| 28 | |
| 29 | function captureRejections() { |
| 30 | const ee = new EventEmitter({ captureRejections: true }); |
| 31 | const _err = new Error('kaboom'); |
| 32 | ee.on('something', common.mustCall(async (value) => { |
| 33 | throw _err; |
| 34 | })); |
| 35 | |
| 36 | ee.on('error', common.mustCall((err) => { |
| 37 | assert.strictEqual(err, _err); |
| 38 | process.nextTick(captureRejectionsTwoHandlers); |
| 39 | })); |
| 40 | |
| 41 | ee.emit('something'); |
| 42 | } |
| 43 | |
| 44 | function captureRejectionsTwoHandlers() { |
| 45 | const ee = new EventEmitter({ captureRejections: true }); |
no test coverage detected