diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index 3224c5fcac4b1d..a7b0ca485d3ade 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -150,6 +150,8 @@ function checkListeners(socket) { socket.off('free', callback); socket.off('close', callback); }); + assert.strictEqual(socket.listenerCount('error'), 1); + assert.strictEqual(socket.listenerCount('end'), 2); socket.once('free', callback); socket.once('close', callback); }