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 <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
jennazee authored and BridgeAR committed Oct 15, 2018
1 parent af68c55 commit f8af209
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 f8af209

Please sign in to comment.