From f29762f4dd5811464684f820286f1c90a694bdff Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Tue, 19 May 2015 13:00:06 +0200 Subject: test: enable linting for tests Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis --- test/parallel/test-http-timeout.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/parallel/test-http-timeout.js') diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index 80393837f3..aab903420f 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -1,3 +1,4 @@ +'use strict'; var common = require('../common'); var assert = require('assert'); @@ -6,8 +7,8 @@ var http = require('http'); var port = common.PORT; var server = http.createServer(function(req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('OK'); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.end('OK'); }); var agent = new http.Agent({maxSockets: 1}); @@ -18,13 +19,13 @@ server.listen(port, function() { createRequest().end(); } - function callback(){} + function callback() {} var count = 0; function createRequest() { - var req = http.request({port: port, path: '/', agent: agent}, function(res) { - + var req = http.request({port: port, path: '/', agent: agent}, + function(res) { req.clearTimeout(callback); res.on('end', function() { @@ -33,7 +34,7 @@ server.listen(port, function() { if (count == 11) { server.close(); } - }) + }); res.resume(); }); -- cgit v1.2.3