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 jasnell committed Oct 17, 2018
1 parent ab052af commit 670770e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-exception-handler.js
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 670770e

Please sign in to comment.