Skip to content

Commit

Permalink
test: removed default message from assert.strictEqual
Browse files Browse the repository at this point in the history
Use the `assert.strictEqual()` default message instead of a static
message to include the actual and expected value.

PR-URL: #19660
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
jaspal-yupana authored and BethGriggs committed Dec 4, 2018
1 parent a62df1b commit 8a546e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/parallel/test-net-server-pause-on-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const server1ConnHandler = (socket) => {
assert.fail('data event should not have happened yet');
}

assert.strictEqual(data.toString(), msg, 'invalid data received');
assert.strictEqual(data.toString(), msg);
socket.end();
server1.close();
});
Expand All @@ -46,12 +46,11 @@ const server1 = net.createServer({ pauseOnConnect: true }, server1ConnHandler);

const server2ConnHandler = (socket) => {
socket.on('data', function(data) {
assert.strictEqual(data.toString(), msg, 'invalid data received');
assert.strictEqual(data.toString(), msg);
socket.end();
server2.close();

assert.strictEqual(server1Sock.bytesRead, 0,
'no data should have been read yet');
assert.strictEqual(server1Sock.bytesRead, 0);
server1Sock.resume();
stopped = false;
});
Expand Down

0 comments on commit 8a546e8

Please sign in to comment.