From 5bc49f9c0c80bc0a535827f92a7eac5d1979cc43 Mon Sep 17 00:00:00 2001 From: Robert Monks Date: Fri, 12 Oct 2018 12:11:25 -0500 Subject: [PATCH] test: update function keywords to fat arrows Updated all the function keywords to fat arrow implementations in test/parallel/test-event-emitter-no-error-provided-to-error-event.js PR-URL: https://github.com/nodejs/node/pull/23493 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- .../test-event-emitter-no-error-provided-to-error-event.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js index 1c56c7bc759215..5c30b54533133d 100644 --- a/test/parallel/test-event-emitter-no-error-provided-to-error-event.js +++ b/test/parallel/test-event-emitter-no-error-provided-to-error-event.js @@ -29,7 +29,7 @@ const domain = require('domain'); const e = new events.EventEmitter(); const d = domain.create(); d.add(e); - d.on('error', common.mustCall(function(er) { + d.on('error', common.mustCall((er) => { assert(er instanceof Error, 'error created'); })); e.emit('error'); @@ -39,7 +39,7 @@ for (const arg of [false, null, undefined]) { const e = new events.EventEmitter(); const d = domain.create(); d.add(e); - d.on('error', common.mustCall(function(er) { + d.on('error', common.mustCall((er) => { assert(er instanceof Error, 'error created'); })); e.emit('error', arg); @@ -49,7 +49,7 @@ for (const arg of [42, 'fortytwo', true]) { const e = new events.EventEmitter(); const d = domain.create(); d.add(e); - d.on('error', common.mustCall(function(er) { + d.on('error', common.mustCall((er) => { assert.strictEqual(er, arg); })); e.emit('error', arg);