diff --git a/test/parallel/test-exception-handler.js b/test/parallel/test-exception-handler.js index 3ce9ad511ace4e..ca25ccd6effcaa 100644 --- a/test/parallel/test-exception-handler.js +++ b/test/parallel/test-exception-handler.js @@ -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);