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 <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>
This commit is contained in:
Robert Monks 2018-10-12 12:11:25 -05:00 committed by Ruben Bridgewater
parent 3fda9860ec
commit 98f170fb86
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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);