Skip to content

Commit

Permalink
test: use arrow functions in test-exception-handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jennazee authored and MylesBorins committed Oct 30, 2018
1 parent 13afb68 commit 627e3ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-exception-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 627e3ad

Please sign in to comment.