Skip to content

Commit

Permalink
test: refactor switch
Browse files Browse the repository at this point in the history
`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: #4870
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
  • Loading branch information
Trott authored and rvagg committed Feb 8, 2016
1 parent 7f1e3e9 commit d95e53d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-child-process-fork-net2.js
Expand Up @@ -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;

Expand Down

0 comments on commit d95e53d

Please sign in to comment.