From c6a99ddd37cfd9cba3d1672482e502c9cdc10cf1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 26 Dec 2015 13:48:54 -0800 Subject: [PATCH] test: remove unused variables from net tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig --- test/parallel/test-net-create-connection.js | 2 +- test/parallel/test-net-dns-custom-lookup.js | 1 - test/parallel/test-net-dns-lookup-skip.js | 1 - test/parallel/test-net-listen-close-server.js | 1 - test/parallel/test-net-local-address-port.js | 2 +- test/parallel/test-net-localerror.js | 2 +- test/parallel/test-net-reconnect.js | 1 - 7 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-net-create-connection.js b/test/parallel/test-net-create-connection.js index c245ddc2ae7860..38452be6e6a954 100644 --- a/test/parallel/test-net-create-connection.js +++ b/test/parallel/test-net-create-connection.js @@ -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; }); diff --git a/test/parallel/test-net-dns-custom-lookup.js b/test/parallel/test-net-dns-custom-lookup.js index 008e831c61fc9c..a2ce3966ae1237 100644 --- a/test/parallel/test-net-dns-custom-lookup.js +++ b/test/parallel/test-net-dns-custom-lookup.js @@ -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) { diff --git a/test/parallel/test-net-dns-lookup-skip.js b/test/parallel/test-net-dns-lookup-skip.js index b293196ad45c7e..9b3ae15fc393ae 100644 --- a/test/parallel/test-net-dns-lookup-skip.js +++ b/test/parallel/test-net-dns-lookup-skip.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var net = require('net'); function check(addressType) { diff --git a/test/parallel/test-net-listen-close-server.js b/test/parallel/test-net-listen-close-server.js index 144ca58bbbe2b9..9cde6df1645d01 100644 --- a/test/parallel/test-net-listen-close-server.js +++ b/test/parallel/test-net-listen-close-server.js @@ -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) { }); diff --git a/test/parallel/test-net-local-address-port.js b/test/parallel/test-net-local-address-port.js index aa28d180dae6ff..728993ee1bb023 100644 --- a/test/parallel/test-net-local-address-port.js +++ b/test/parallel/test-net-local-address-port.js @@ -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++; diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index 45ec1fc9099955..ed7c9471e0397f 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -17,6 +17,6 @@ connect({ function connect(opts, msg) { assert.throws(function() { - var client = net.connect(opts); + net.connect(opts); }, msg); } diff --git a/test/parallel/test-net-reconnect.js b/test/parallel/test-net-reconnect.js index b2e8f6ea8b4e3f..f8cdcbdc4e76dd 100644 --- a/test/parallel/test-net-reconnect.js +++ b/test/parallel/test-net-reconnect.js @@ -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;