test: apply camelCase in test-net-reconnect-error

Rename two idnetifiers that were snake_case rather than camelCase.

Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32120
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
pull/32120/head
Rich Trott 2020-03-05 23:07:49 -08:00
parent 6aff62fcb3
commit 4c6ef4b7e2
1 changed files with 6 additions and 6 deletions

View File

@ -24,24 +24,24 @@ const common = require('../common');
const net = require('net');
const assert = require('assert');
const N = 20;
let client_error_count = 0;
let disconnect_count = 0;
let clientErrorCount = 0;
let disconnectCount = 0;
const c = net.createConnection(common.PORT);
c.on('connect', common.mustNotCall('client should not have connected'));
c.on('error', common.mustCall((e) => {
client_error_count++;
clientErrorCount++;
assert.strictEqual(e.code, 'ECONNREFUSED');
}, N + 1));
c.on('close', common.mustCall(() => {
if (disconnect_count++ < N)
if (disconnectCount++ < N)
c.connect(common.PORT); // reconnect
}, N + 1));
process.on('exit', function() {
assert.strictEqual(disconnect_count, N + 1);
assert.strictEqual(client_error_count, N + 1);
assert.strictEqual(disconnectCount, N + 1);
assert.strictEqual(clientErrorCount, N + 1);
});