From 670770e2757613bca8a286c801e3fa94e356f9a3 Mon Sep 17 00:00:00 2001 From: Jenna Zeigen Date: Fri, 12 Oct 2018 09:55:19 -0700 Subject: [PATCH] test: use arrow functions in test-exception-handler PR-URL: https://github.com/nodejs/node/pull/23498 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/parallel/test-exception-handler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);