From c76346295072086154639ec1ad815ff426c7311a Mon Sep 17 00:00:00 2001 From: willhayslett Date: Wed, 21 Mar 2018 20:22:44 -0500 Subject: [PATCH] test: removed unhelpful message from assert.strictEqual() calls 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. --- test/parallel/test-http-agent-error-on-idle.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-agent-error-on-idle.js b/test/parallel/test-http-agent-error-on-idle.js index fce5e8f0324f5c..7cf494816ae266 100644 --- a/test/parallel/test-http-agent-error-on-idle.js +++ b/test/parallel/test-http-agent-error-on-idle.js @@ -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();