Skip to content

Commit 18c4e5e

Browse files
willhayslettBethGriggs
authored andcommittedDec 3, 2018
test: remove message from assert.strictEqual()
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 <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 146c488 commit 18c4e5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎test/parallel/test-http-agent-error-on-idle.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ server.listen(0, () => {
2727
res.on('end', common.mustCall(() => {
2828
process.nextTick(common.mustCall(() => {
2929
const freeSockets = agent.freeSockets[socketKey];
30-
assert.strictEqual(freeSockets.length, 1,
31-
`expect a free socket on ${socketKey}`);
30+
//expect a free socket on socketKey
31+
assert.strictEqual(freeSockets.length, 1);
3232

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

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

4646
agent.destroy();
4747
server.close();

0 commit comments

Comments
 (0)
Please sign in to comment.