Browse Source

test: remove unused variables from net tests

Remove a handful of variables that are declared but never used in the
tests for the net module.

PR-URL: https://github.com/nodejs/node/pull/4430
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
process-exit-stdio-flushing
Rich Trott 9 years ago
parent
commit
1762db0142
  1. 2
      test/parallel/test-net-create-connection.js
  2. 1
      test/parallel/test-net-dns-custom-lookup.js
  3. 1
      test/parallel/test-net-dns-lookup-skip.js
  4. 1
      test/parallel/test-net-listen-close-server.js
  5. 2
      test/parallel/test-net-local-address-port.js
  6. 2
      test/parallel/test-net-localerror.js
  7. 1
      test/parallel/test-net-reconnect.js

2
test/parallel/test-net-create-connection.js

@ -22,7 +22,7 @@ server.listen(tcpPort, 'localhost', function() {
function fail(opts, errtype, msg) { function fail(opts, errtype, msg) {
assert.throws(function() { assert.throws(function() {
var client = net.createConnection(opts, cb); net.createConnection(opts, cb);
}, function(err) { }, function(err) {
return err instanceof errtype && msg === err.message; return err instanceof errtype && msg === err.message;
}); });

1
test/parallel/test-net-dns-custom-lookup.js

@ -2,7 +2,6 @@
var common = require('../common'); var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var net = require('net'); var net = require('net');
var dns = require('dns');
var ok = false; var ok = false;
function check(addressType, cb) { function check(addressType, cb) {

1
test/parallel/test-net-dns-lookup-skip.js

@ -1,6 +1,5 @@
'use strict'; 'use strict';
var common = require('../common'); var common = require('../common');
var assert = require('assert');
var net = require('net'); var net = require('net');
function check(addressType) { function check(addressType) {

1
test/parallel/test-net-listen-close-server.js

@ -2,7 +2,6 @@
var common = require('../common'); var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var net = require('net'); var net = require('net');
var gotError = false;
var server = net.createServer(function(socket) { var server = net.createServer(function(socket) {
}); });

2
test/parallel/test-net-local-address-port.js

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var net = require('net'); var net = require('net');
var conns = 0, conns_closed = 0; var conns = 0;
var server = net.createServer(function(socket) { var server = net.createServer(function(socket) {
conns++; conns++;

2
test/parallel/test-net-localerror.js

@ -17,6 +17,6 @@ connect({
function connect(opts, msg) { function connect(opts, msg) {
assert.throws(function() { assert.throws(function() {
var client = net.connect(opts); net.connect(opts);
}, msg); }, msg);
} }

1
test/parallel/test-net-reconnect.js

@ -5,7 +5,6 @@ var assert = require('assert');
var net = require('net'); var net = require('net');
var N = 50; var N = 50;
var c = 0;
var client_recv_count = 0; var client_recv_count = 0;
var client_end_count = 0; var client_end_count = 0;
var disconnect_count = 0; var disconnect_count = 0;

Loading…
Cancel
Save