Skip to content

Commit

Permalink
test: re-order strictEqual paramater calls
Browse files Browse the repository at this point in the history
PR-URL: #23607
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
ptichonczuk-tc authored and jasnell committed Oct 17, 2018
1 parent 50a280a commit d08ac84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-net-reconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const server = net.createServer(function(socket) {

socket.on('close', function(had_error) {
console.log(`SERVER had_error: ${JSON.stringify(had_error)}`);
assert.strictEqual(false, had_error);
assert.strictEqual(had_error, false);
});
});

Expand All @@ -61,7 +61,7 @@ server.listen(0, function() {
client.on('data', function(chunk) {
client_recv_count += 1;
console.log(`client_recv_count ${client_recv_count}`);
assert.strictEqual('hello\r\n', chunk);
assert.strictEqual(chunk, 'hello\r\n');
console.error('CLIENT: calling end', client._writableState);
client.end();
});
Expand All @@ -73,7 +73,7 @@ server.listen(0, function() {

client.on('close', function(had_error) {
console.log('CLIENT disconnect');
assert.strictEqual(false, had_error);
assert.strictEqual(had_error, false);
if (disconnect_count++ < N)
client.connect(server.address().port); // reconnect
else
Expand All @@ -82,7 +82,7 @@ server.listen(0, function() {
});

process.on('exit', function() {
assert.strictEqual(N + 1, disconnect_count);
assert.strictEqual(N + 1, client_recv_count);
assert.strictEqual(N + 1, client_end_count);
assert.strictEqual(disconnect_count, N + 1);
assert.strictEqual(client_recv_count, N + 1);
assert.strictEqual(client_end_count, N + 1);
});

0 comments on commit d08ac84

Please sign in to comment.