Skip to content

Commit

Permalink
test: remove unused variables from net tests
Browse files Browse the repository at this point in the history
Remove a handful of variables that are declared but never used in the
tests for the net module.

PR-URL: #4430
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott committed Dec 29, 2015
1 parent 2b1999b commit 1762db0
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-net-create-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ server.listen(tcpPort, 'localhost', function() {

function fail(opts, errtype, msg) {
assert.throws(function() {
var client = net.createConnection(opts, cb);
net.createConnection(opts, cb);
}, function(err) {
return err instanceof errtype && msg === err.message;
});
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-net-dns-custom-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var common = require('../common');
var assert = require('assert');
var net = require('net');
var dns = require('dns');
var ok = false;

function check(addressType, cb) {
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-net-dns-lookup-skip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var net = require('net');

function check(addressType) {
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-net-listen-close-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
var common = require('../common');
var assert = require('assert');
var net = require('net');
var gotError = false;

var server = net.createServer(function(socket) {
});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-local-address-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
var net = require('net');

var conns = 0, conns_closed = 0;
var conns = 0;

var server = net.createServer(function(socket) {
conns++;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-localerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ connect({

function connect(opts, msg) {
assert.throws(function() {
var client = net.connect(opts);
net.connect(opts);
}, msg);
}
1 change: 0 additions & 1 deletion test/parallel/test-net-reconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var assert = require('assert');
var net = require('net');

var N = 50;
var c = 0;
var client_recv_count = 0;
var client_end_count = 0;
var disconnect_count = 0;
Expand Down

0 comments on commit 1762db0

Please sign in to comment.