diff options
author | spring_raining <fdonthavei@gmail.com> | 2017-11-26 17:45:11 +0900 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-11-26 09:29:50 -0800 |
commit | 8b68d48d82ff64a2af46af4ea35d2aac46cc004c (patch) | |
tree | 283f090c50a39e03ccf17c0f2c367ce9ee54c164 /test | |
parent | fae23a1a91685c97f4bee771eb68eb90ce3dad3d (diff) | |
download | android-node-v8-8b68d48d82ff64a2af46af4ea35d2aac46cc004c.tar.gz android-node-v8-8b68d48d82ff64a2af46af4ea35d2aac46cc004c.tar.bz2 android-node-v8-8b68d48d82ff64a2af46af4ea35d2aac46cc004c.zip |
test: replace function with arrow function
Replace some classic functions with arrow functions in
test-child-process-send-cb.js
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-child-process-send-cb.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-child-process-send-cb.js b/test/parallel/test-child-process-send-cb.js index d65a1abd20..daecd72253 100644 --- a/test/parallel/test-child-process-send-cb.js +++ b/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); })); |