Skip to content

Commit f8af209

Browse files
jennazeeBridgeAR
authored andcommitted
test: use arrow functions in test-exception-handler
PR-URL: #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>
1 parent af68c55 commit f8af209

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-exception-handler.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const assert = require('assert');
2525

2626
const MESSAGE = 'catch me if you can';
2727

28-
process.on('uncaughtException', common.mustCall(function(e) {
28+
process.on('uncaughtException', common.mustCall((e) => {
2929
console.log('uncaught exception! 1');
3030
assert.strictEqual(MESSAGE, e.message);
3131
}));
3232

33-
process.on('uncaughtException', common.mustCall(function(e) {
33+
process.on('uncaughtException', common.mustCall((e) => {
3434
console.log('uncaught exception! 2');
3535
assert.strictEqual(MESSAGE, e.message);
3636
}));
3737

38-
setTimeout(function() {
38+
setTimeout(() => {
3939
throw new Error(MESSAGE);
4040
}, 10);

0 commit comments

Comments
 (0)