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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
willhayslett authored and Michaël Zasso committed 2018-03-27 16:03:16 +02:00
1 parent ab561c090b
commit efa38bd1a0
1 file changed
+4 -4
@@ -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];
@@ -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();