Skip to content

Commit

Permalink
test: remove message from assert.strictEqual()
Browse files Browse the repository at this point in the history
Converted the 'message' argument values from the last two free socket
assert.strictEqual() calls to code comments as they fail to provide the
necessary details and values specific to why the test is failing. The
default message returned from the strictEqual() call should provide
sufficient details for debugging errors.

PR-URL: #19525
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
willhayslett authored and BethGriggs committed Dec 3, 2018
1 parent 146c488 commit 18c4e5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-http-agent-error-on-idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ server.listen(0, () => {
res.on('end', common.mustCall(() => {
process.nextTick(common.mustCall(() => {
const freeSockets = agent.freeSockets[socketKey];
assert.strictEqual(freeSockets.length, 1,
`expect a free socket on ${socketKey}`);
//expect a free socket on socketKey
assert.strictEqual(freeSockets.length, 1);

//generate a random error on the free socket
const freeSocket = freeSockets[0];
Expand All @@ -40,8 +40,8 @@ server.listen(0, () => {
}));

function done() {
assert.strictEqual(Object.keys(agent.freeSockets).length, 0,
'expect the freeSockets pool to be empty');
//expect the freeSockets pool to be empty
assert.strictEqual(Object.keys(agent.freeSockets).length, 0);

agent.destroy();
server.close();
Expand Down

0 comments on commit 18c4e5e

Please sign in to comment.