From f2c97d9572f34589f61901d6f6f71509a74a1a36 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 25 Jan 2016 16:07:59 -0800 Subject: [PATCH] test: refactor switch `test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: https://github.com/nodejs/node/pull/4870 Reviewed-By: Alexis Campailla --- test/parallel/test-child-process-fork-net2.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js index 359b88f559caa5..45004041cc1c97 100644 --- a/test/parallel/test-child-process-fork-net2.js +++ b/test/parallel/test-child-process-fork-net2.js @@ -71,17 +71,17 @@ if (process.argv[2] === 'child') { server.on('connection', function(socket) { switch (connected % 6) { case 0: - child1.send('end', socket, { track: false }); break; + child1.send('end', socket); break; case 1: - child1.send('write', socket, { track: true }); break; + child1.send('write', socket); break; case 2: - child2.send('end', socket, { track: true }); break; + child2.send('end', socket); break; case 3: - child2.send('write', socket, { track: false }); break; + child2.send('write', socket); break; case 4: - child3.send('end', socket, { track: false }); break; + child3.send('end', socket); break; case 5: - child3.send('write', socket, { track: false }); break; + child3.send('write', socket); break; } connected += 1;