Permalink
Browse files

test: replace function with arrow function

Replace some classic functions with arrow functions in
test-child-process-send-cb.js

PR-URL: #17312
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
spring-raining authored and gibfahn committed Nov 26, 2017
1 parent c519287 commit 1cd4076a4e846a98b24a68af5865440e894fe5a2
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/parallel/test-child-process-send-cb.js
@@ -4,15 +4,15 @@ const assert = require('assert');
const fork = require('child_process').fork;
if (process.argv[2] === 'child') {
process.send('ok', common.mustCall(function(err) {
process.send('ok', common.mustCall((err) => {
assert.strictEqual(err, null);
}));
} else {
const child = fork(process.argv[1], ['child']);
child.on('message', common.mustCall(function(message) {
child.on('message', common.mustCall((message) => {
assert.strictEqual(message, 'ok');
}));
child.on('exit', common.mustCall(function(exitCode, signalCode) {
child.on('exit', common.mustCall((exitCode, signalCode) => {
assert.strictEqual(exitCode, 0);
assert.strictEqual(signalCode, null);
}));

0 comments on commit 1cd4076

Please sign in to comment.