Skip to content

Commit bc39d6a

Browse files
Trottjasnell
authored andcommitted
test: remove unused vars
Remove unused vars in tests PR-URL: #4536 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent a497bb5 commit bc39d6a

24 files changed

Lines changed: 24 additions & 45 deletions

‎test/addons/repl-domain-abort/test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ var options = {
4646
};
4747

4848
// Run commands from fake REPL.
49-
vardummy=repl.start(options);
49+
repl.start(options);

‎test/debugger/test-debugger-pid.js‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
'use strict';
2-
varcommon=require('../common');
2+
require('../common');
33
varassert=require('assert');
44
varspawn=require('child_process').spawn;
55

6-
varport=common.PORT+1337;
76
varbuffer='';
8-
varexpected=[];
9-
varscriptToDebug=common.fixturesDir+'/empty.js';
10-
11-
functionfail(){
12-
assert(0);// `--debug-brk script.js` should not quit
13-
}
147

158
// connect to debug agent
169
varinterfacer=spawn(process.execPath,['debug','-p','655555']);

‎test/debugger/test-debugger-remote.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ var common = require('../common');
33
varassert=require('assert');
44
varspawn=require('child_process').spawn;
55

6-
varport=common.PORT+1337;
76
varbuffer='';
8-
varexpected=[];
97
varscriptToDebug=common.fixturesDir+'/empty.js';
108

119
functionfail(){

‎test/internet/test-dns.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ require('../common');
33
varassert=require('assert'),
44
dns=require('dns'),
55
net=require('net'),
6-
isIP=net.isIP,
76
isIPv4=net.isIPv4,
87
isIPv6=net.isIPv6;
98
varutil=require('util');
@@ -48,7 +47,7 @@ TEST(function test_reverse_bogus(done) {
4847
varerror;
4948

5049
try{
51-
varreq=dns.reverse('bogus ip',function(){
50+
dns.reverse('bogus ip',function(){
5251
assert.ok(false);
5352
});
5453
}catch(e){
@@ -369,7 +368,7 @@ console.log('looking up nodejs.org...');
369368

370369
varcares=process.binding('cares_wrap');
371370
varreq=newcares.GetAddrInfoReqWrap();
372-
varerr=cares.getaddrinfo(req,'nodejs.org',4);
371+
cares.getaddrinfo(req,'nodejs.org',4);
373372

374373
req.oncomplete=function(err,domains){
375374
assert.strictEqual(err,0);

‎test/parallel/test-domain-exit-dispose-again.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// to that domain, including those whose callbacks are called from within
66
// the same invocation of listOnTimeout, _are_ called.
77

8-
varcommon=require('../common');
8+
require('../common');
99
varassert=require('assert');
1010
vardomain=require('domain');
1111
vardisposalFailed=false;

‎test/parallel/test-domain-implicit-fs.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require('../common');
55
varassert=require('assert');
66
vardomain=require('domain');
7-
varevents=require('events');
87
varcaught=0;
98
varexpectCaught=1;
109

‎test/parallel/test-http-agent-error-on-idle.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function get(callback) {
2121
returnhttp.get(requestParams,callback);
2222
}
2323

24-
vardestroy_queue={};
2524
varserver=http.createServer(function(req,res){
2625
res.end('hello world');
2726
});

‎test/parallel/test-timers-throw-when-cb-not-function.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
constcommon=require('../common');
2+
require('../common');
33
constassert=require('assert');
44

55
functiondoSetTimeout(callback,after){

‎test/parallel/test-vm-create-context-arg.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ var assert = require('assert');
44
varvm=require('vm');
55

66
assert.throws(function(){
7-
varctx=vm.createContext('string is not supported');
7+
vm.createContext('string is not supported');
88
},TypeError);
99

1010
assert.doesNotThrow(function(){
11-
varctx=vm.createContext({a: 1});
12-
ctx=vm.createContext([0,1,2,3]);
11+
vm.createContext({a: 1});
12+
vm.createContext([0,1,2,3]);
1313
});
1414

1515
assert.doesNotThrow(function(){

‎test/parallel/test-vm-harmony-proxies.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ var vm = require('vm');
88
// src/node_contextify.cc filters out the Proxy object from the parent
99
// context. Make sure that the new context has a Proxy object of its own.
1010
varsandbox={};
11-
varresult=vm.runInNewContext('this.Proxy = Proxy',sandbox);
11+
vm.runInNewContext('this.Proxy = Proxy',sandbox);
1212
assert(typeofsandbox.Proxy==='object');
1313
assert(sandbox.Proxy!==Proxy);
1414

1515
// Unless we copy the Proxy object explicitly, of course.
1616
varsandbox={Proxy: Proxy};
17-
varresult=vm.runInNewContext('this.Proxy = Proxy',sandbox);
17+
vm.runInNewContext('this.Proxy = Proxy',sandbox);
1818
assert(typeofsandbox.Proxy==='object');
1919
assert(sandbox.Proxy===Proxy);

0 commit comments

Comments
 (0)