diff --git a/test/parallel/test-http-1.0-keep-alive.js b/test/parallel/test-http-1.0-keep-alive.js index eac0fe51e2206a..516a02031ef247 100644 --- a/test/parallel/test-http-1.0-keep-alive.js +++ b/test/parallel/test-http-1.0-keep-alive.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-304.js b/test/parallel/test-http-304.js index 06fd60f5572ba2..6ac1c68d0d3665 100644 --- a/test/parallel/test-http-304.js +++ b/test/parallel/test-http-304.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var childProcess = require('child_process'); diff --git a/test/parallel/test-http-abort-client.js b/test/parallel/test-http-abort-client.js index e24ded11d1a7ec..4d7a32c1dfb26b 100644 --- a/test/parallel/test-http-abort-client.js +++ b/test/parallel/test-http-abort-client.js @@ -14,7 +14,7 @@ var server = http.Server(function(req, res) { var responseClose = false; server.listen(common.PORT, function() { - var client = http.get({ + http.get({ port: common.PORT, headers: { connection: 'keep-alive' } diff --git a/test/parallel/test-http-after-connect.js b/test/parallel/test-http-after-connect.js index edd03b2178b2ba..ed18def8608820 100644 --- a/test/parallel/test-http-after-connect.js +++ b/test/parallel/test-http-after-connect.js @@ -45,7 +45,7 @@ server.listen(common.PORT, function() { }); function doRequest(i) { - var req = http.get({ + http.get({ port: common.PORT, path: '/request' + i }, function(res) { diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index ef9553c8316841..64637f6bcabaec 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -3,7 +3,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); var Agent = require('_http_agent').Agent; -var EventEmitter = require('events').EventEmitter; var agent = new Agent({ keepAlive: true, diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index e118738f664083..29961ff3a5e84b 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -2,7 +2,6 @@ var common = require('../common'); var assert = require('assert'); var http = require('http'); -var net = require('net'); var request = 0; var response = 0; diff --git a/test/parallel/test-http-byteswritten.js b/test/parallel/test-http-byteswritten.js index 974f446dd436b4..fdc407aec667ba 100644 --- a/test/parallel/test-http-byteswritten.js +++ b/test/parallel/test-http-byteswritten.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var body = 'hello world\n'; diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js index 3f7ae98fa25820..477d12b25827b2 100644 --- a/test/parallel/test-http-client-abort2.js +++ b/test/parallel/test-http-client-abort2.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-client-encoding.js b/test/parallel/test-http-client-encoding.js index dd696f4dff608a..baaef855b1e6e0 100644 --- a/test/parallel/test-http-client-encoding.js +++ b/test/parallel/test-http-client-encoding.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-client-pipe-end.js b/test/parallel/test-http-client-pipe-end.js index efe241419397e4..715f8ccf79df92 100644 --- a/test/parallel/test-http-client-pipe-end.js +++ b/test/parallel/test-http-client-pipe-end.js @@ -2,7 +2,6 @@ // see https://github.com/joyent/node/issues/3257 var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 457424ecfa9397..e403b401fb603f 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -57,7 +57,7 @@ if (common.hasCrypto) { res.end('ok'); this.close(); }).listen(SSLPORT, function() { - var req = https.get({ + https.get({ host: 'localhost', rejectUnauthorized: false, headers: { diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 5bbb3bbc946f7d..9065939ccbd798 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -6,7 +6,6 @@ var assert = require('assert'); // where the server has ended the socket. var http = require('http'); -var net = require('net'); var server = http.createServer(function(req, res) { setImmediate(function() { res.destroy(); diff --git a/test/parallel/test-http-eof-on-connect.js b/test/parallel/test-http-eof-on-connect.js index e676643bab4911..fc7dd1d9fe88ce 100644 --- a/test/parallel/test-http-eof-on-connect.js +++ b/test/parallel/test-http-eof-on-connect.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var net = require('net'); var http = require('http'); diff --git a/test/parallel/test-http-exceptions.js b/test/parallel/test-http-exceptions.js index dc2d5583ddbaf9..922dc2095714be 100644 --- a/test/parallel/test-http-exceptions.js +++ b/test/parallel/test-http-exceptions.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var server = http.createServer(function(req, res) { @@ -11,9 +10,8 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, function() { - var req; for (var i = 0; i < 4; i += 1) { - req = http.get({ port: common.PORT, path: '/busy/' + i }); + http.get({ port: common.PORT, path: '/busy/' + i }); } }); diff --git a/test/parallel/test-http-flush.js b/test/parallel/test-http-flush.js index cac1caf752bee6..8dc7ba7418dc88 100644 --- a/test/parallel/test-http-flush.js +++ b/test/parallel/test-http-flush.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); http.createServer(function(req, res) { diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js index 21cd3e69dfd746..1e5a910424d737 100644 --- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js +++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var net = require('net'); diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js index f89f7698c46ebd..0d30bbe1da3069 100644 --- a/test/parallel/test-http-keep-alive.js +++ b/test/parallel/test-http-keep-alive.js @@ -11,7 +11,6 @@ var server = http.createServer(function(req, res) { res.end(); }); -var connectCount = 0; var agent = new http.Agent({maxSockets: 1}); var headers = {'connection': 'keep-alive'}; var name = agent.getName({ port: common.PORT }); diff --git a/test/parallel/test-http-localaddress-bind-error.js b/test/parallel/test-http-localaddress-bind-error.js index 9a4bde26cd22d6..adaeba2b9459ea 100644 --- a/test/parallel/test-http-localaddress-bind-error.js +++ b/test/parallel/test-http-localaddress-bind-error.js @@ -17,7 +17,7 @@ var server = http.createServer(function(req, res) { }); server.listen(common.PORT, '127.0.0.1', function() { - var req = http.request({ + http.request({ host: 'localhost', port: common.PORT, path: '/', diff --git a/test/parallel/test-http-many-ended-pipelines.js b/test/parallel/test-http-many-ended-pipelines.js index 604dab7cc2c1d2..c415af64f9dcd6 100644 --- a/test/parallel/test-http-many-ended-pipelines.js +++ b/test/parallel/test-http-many-ended-pipelines.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); // no warnings should happen! var trace = console.trace; diff --git a/test/parallel/test-http-no-content-length.js b/test/parallel/test-http-no-content-length.js index 5752e5e924cd1b..7a205dc07df3ca 100644 --- a/test/parallel/test-http-no-content-length.js +++ b/test/parallel/test-http-no-content-length.js @@ -10,7 +10,7 @@ var server = net.createServer(function(socket) { // Neither Content-Length nor Connection socket.end('HTTP/1.1 200 ok\r\n\r\nHello'); }).listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { res.setEncoding('utf8'); res.on('data', function(chunk) { body += chunk; diff --git a/test/parallel/test-http-pipeline-regr-3508.js b/test/parallel/test-http-pipeline-regr-3508.js index 05639a2a42c5a7..74fe7586726cbd 100644 --- a/test/parallel/test-http-pipeline-regr-3508.js +++ b/test/parallel/test-http-pipeline-regr-3508.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); const net = require('net'); diff --git a/test/parallel/test-http-proxy.js b/test/parallel/test-http-proxy.js index fc8a753f2485ce..8a579cd69aa5b4 100644 --- a/test/parallel/test-http-proxy.js +++ b/test/parallel/test-http-proxy.js @@ -25,7 +25,7 @@ var backend = http.createServer(function(req, res) { var proxy = http.createServer(function(req, res) { console.error('proxy req headers: ' + JSON.stringify(req.headers)); - var proxy_req = http.get({ + http.get({ port: BACKEND_PORT, path: url.parse(req.url).pathname }, function(proxy_res) { @@ -56,7 +56,7 @@ function startReq() { nlistening++; if (nlistening < 2) return; - var client = http.get({ + http.get({ port: PROXY_PORT, path: '/test' }, function(res) { diff --git a/test/parallel/test-http-raw-headers.js b/test/parallel/test-http-raw-headers.js index 7ecaaa93cfb04e..2042c0262a95ed 100644 --- a/test/parallel/test-http-raw-headers.js +++ b/test/parallel/test-http-raw-headers.js @@ -54,14 +54,6 @@ http.createServer(function(req, res) { ]); res.end('x f o o'); }).listen(common.PORT, function() { - var expectRawHeaders = [ - 'Date', - 'Tue, 06 Aug 2013 01:31:54 GMT', - 'Connection', - 'close', - 'Transfer-Encoding', - 'chunked' - ]; var req = http.request({ port: common.PORT, path: '/' }); req.addTrailers([ ['x-bAr', 'yOyOyOy'], diff --git a/test/parallel/test-http-regr-gh-2821.js b/test/parallel/test-http-regr-gh-2821.js index 4fdef2369bb168..8725111324a869 100644 --- a/test/parallel/test-http-regr-gh-2821.js +++ b/test/parallel/test-http-regr-gh-2821.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); const server = http.createServer(function(req, res) { diff --git a/test/parallel/test-http-res-write-after-end.js b/test/parallel/test-http-res-write-after-end.js index c8b3bf26e0804b..206f4273ec70c7 100644 --- a/test/parallel/test-http-res-write-after-end.js +++ b/test/parallel/test-http-res-write-after-end.js @@ -18,7 +18,7 @@ var server = http.Server(function(req, res) { }); server.listen(common.PORT, function() { - var req = http.get({port: common.PORT}, function(res) { + http.get({port: common.PORT}, function(res) { server.close(); }); }); diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index a866d39c2cc735..349e869c1a4fbc 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); var util = require('util'); var fork = require('child_process').fork; diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index aab903420f0acc..f459961517852b 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -1,6 +1,5 @@ 'use strict'; var common = require('../common'); -var assert = require('assert'); var http = require('http'); diff --git a/test/parallel/test-http-unix-socket.js b/test/parallel/test-http-unix-socket.js index 98ed839241c2c6..bdac0566c33a42 100644 --- a/test/parallel/test-http-unix-socket.js +++ b/test/parallel/test-http-unix-socket.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common'); var assert = require('assert'); -var fs = require('fs'); var http = require('http'); var status_ok = false; // status code == 200? diff --git a/test/parallel/test-http-url.parse-https.request.js b/test/parallel/test-http-url.parse-https.request.js index 10c40ec0310708..df01ae64f81dba 100644 --- a/test/parallel/test-http-url.parse-https.request.js +++ b/test/parallel/test-http-url.parse-https.request.js @@ -10,7 +10,6 @@ var https = require('https'); var url = require('url'); var fs = require('fs'); -var clientRequest; // https options var httpsOptions = {