Skip to content

Commit 18c4e5e

Browse files
willhayslettBethGriggs
authored andcommitted
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 <[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]>
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)