Skip to content

Commit c0e9c94

Browse files
silverwindMyles Borins
authored andcommitted
test: fix issues for ESLint 2.7.0
PR-URL: #6132 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
1 parent d9b8758 commit c0e9c94

5 files changed

Lines changed: 24 additions & 28 deletions

‎test/parallel/test-async-wrap-disabled-propagate-parent.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const providers = Object.keys(async_wrap.Providers);
99
constuidSymbol=Symbol('uid');
1010

1111
letcntr=0;
12-
letserver;
1312
letclient;
1413

1514
functioninit(uid,type,parentUid,parentHandle){
@@ -34,7 +33,7 @@ function noop() { }
3433
async_wrap.setupHooks({ init });
3534
async_wrap.enable();
3635

37-
server=net.createServer(function(c){
36+
constserver=net.createServer(function(c){
3837
client=c;
3938
// Allow init callback to run before closing.
4039
setImmediate(()=>{

‎test/parallel/test-async-wrap-propagate-parent.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const providers = Object.keys(async_wrap.Providers);
99
constuidSymbol=Symbol('uid');
1010

1111
letcntr=0;
12-
letserver;
1312
letclient;
1413

1514
functioninit(uid,type,parentUid,parentHandle){
@@ -34,7 +33,7 @@ function noop() { }
3433
async_wrap.setupHooks({ init });
3534
async_wrap.enable();
3635

37-
server=net.createServer(function(c){
36+
constserver=net.createServer(function(c){
3837
client=c;
3938
// Allow init callback to run before closing.
4039
setImmediate(()=>{

‎test/parallel/test-stream-writev.js‎

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,24 @@ function test(decode, uncork, multi, next) {
4343
assert(false,'Should not call _write');
4444
};
4545

46-
varexpectChunks=decode ?
47-
[
48-
{encoding: 'buffer',
49-
chunk: [104,101,108,108,111,44,32]},
50-
{encoding: 'buffer',
51-
chunk: [119,111,114,108,100]},
52-
{encoding: 'buffer',
53-
chunk: [33]},
54-
{encoding: 'buffer',
55-
chunk: [10,97,110,100,32,116,104,101,110,46,46,46]},
56-
{encoding: 'buffer',
57-
chunk: [250,206,190,167,222,173,190,239,222,202,251,173]}
58-
] : [
59-
{encoding: 'ascii',chunk: 'hello, '},
60-
{encoding: 'utf8',chunk: 'world'},
61-
{encoding: 'buffer',chunk: [33]},
62-
{encoding: 'binary',chunk: '\nand then...'},
63-
{encoding: 'hex',chunk: 'facebea7deadbeefdecafbad'}
64-
];
46+
varexpectChunks=decode ? [
47+
{encoding: 'buffer',
48+
chunk: [104,101,108,108,111,44,32]},
49+
{encoding: 'buffer',
50+
chunk: [119,111,114,108,100]},
51+
{encoding: 'buffer',
52+
chunk: [33]},
53+
{encoding: 'buffer',
54+
chunk: [10,97,110,100,32,116,104,101,110,46,46,46]},
55+
{encoding: 'buffer',
56+
chunk: [250,206,190,167,222,173,190,239,222,202,251,173]}
57+
] : [
58+
{encoding: 'ascii',chunk: 'hello, '},
59+
{encoding: 'utf8',chunk: 'world'},
60+
{encoding: 'buffer',chunk: [33]},
61+
{encoding: 'binary',chunk: '\nand then...'},
62+
{encoding: 'hex',chunk: 'facebea7deadbeefdecafbad'}
63+
];
6564

6665
varactualChunks;
6766
w._writev=function(chunks,cb){

‎test/parallel/test-timers-immediate.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var assert = require('assert');
55
letimmediateA=false;
66
letimmediateB=false;
77
letimmediateC=[];
8-
letbefore;
98

109
setImmediate(function(){
1110
try{
@@ -16,7 +15,7 @@ setImmediate(function() {
1615
clearImmediate(immediateB);
1716
});
1817

19-
before=process.hrtime();
18+
constbefore=process.hrtime();
2019

2120
immediateB=setImmediate(function(){
2221
immediateB=true;

‎test/parallel/test-timers-unref.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let timeout_fired = false;
77
letunref_interval=false;
88
letunref_timer=false;
99
letunref_callbacks=0;
10-
letinterval,check_unref,checks=0;
10+
letchecks=0;
1111

1212
varLONG_TIME=10*1000;
1313
varSHORT_TIME=100;
@@ -28,7 +28,7 @@ setTimeout(function() {
2828
timeout_fired=true;
2929
},LONG_TIME).unref();
3030

31-
interval=setInterval(function(){
31+
constinterval=setInterval(function(){
3232
unref_interval=true;
3333
clearInterval(interval);
3434
},SHORT_TIME);
@@ -38,7 +38,7 @@ setTimeout(function() {
3838
unref_timer=true;
3939
},SHORT_TIME).unref();
4040

41-
check_unref=setInterval(function(){
41+
constcheck_unref=setInterval(function(){
4242
if(checks>5||(unref_interval&&unref_timer))
4343
clearInterval(check_unref);
4444
checks+=1;

0 commit comments

Comments
 (0)