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:
Jenna Zeigen 2018-10-12 09:55:19 -07:00 committed by Ruben Bridgewater
parent af68c554a5
commit f8af209f42
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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);