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 <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
jaspal-yupana authored and BridgeAR committed Mar 29, 2018
1 parent 42c7402 commit 0434bd4
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 0434bd4

Please sign in to comment.