test: use arrow functions in test-exception-handler
PR-URL: https://github.com/nodejs/node/pull/23498 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
af68c554a5
commit
f8af209f42
@ -25,16 +25,16 @@ const assert = require('assert');
|
||||
|
||||
const MESSAGE = 'catch me if you can';
|
||||
|
||||
process.on('uncaughtException', common.mustCall(function(e) {
|
||||
process.on('uncaughtException', common.mustCall((e) => {
|
||||
console.log('uncaught exception! 1');
|
||||
assert.strictEqual(MESSAGE, e.message);
|
||||
}));
|
||||
|
||||
process.on('uncaughtException', common.mustCall(function(e) {
|
||||
process.on('uncaughtException', common.mustCall((e) => {
|
||||
console.log('uncaught exception! 2');
|
||||
assert.strictEqual(MESSAGE, e.message);
|
||||
}));
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(() => {
|
||||
throw new Error(MESSAGE);
|
||||
}, 10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user