Skip to content

Commit 6d5b215

Browse files
pmasucciaddaleax
authored andcommitted
test: swap var->const/let and equal->strictEqual
Change instances of var with const/let. Change assert.equal to assert.strictEqual. PR-URL: #9888 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5446b3c commit 6d5b215

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

‎test/parallel/test-tls-no-sslv3.js‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
2+
constcommon=require('../common');
3+
constassert=require('assert');
44

55
if(!common.hasCrypto){
66
common.skip('missing crypto');
77
return;
88
}
9-
vartls=require('tls');
9+
consttls=require('tls');
1010

11-
varfs=require('fs');
12-
varspawn=require('child_process').spawn;
11+
constfs=require('fs');
12+
constspawn=require('child_process').spawn;
1313

1414
if(common.opensslCli===false){
1515
common.skip('node compiled without OpenSSL CLI.');
1616
return;
1717
}
1818

19-
varcert=fs.readFileSync(common.fixturesDir+'/test_cert.pem');
20-
varkey=fs.readFileSync(common.fixturesDir+'/test_key.pem');
21-
varserver=tls.createServer({cert: cert,key: key},common.fail);
22-
varerrors=[];
23-
varstderr='';
19+
constcert=fs.readFileSync(common.fixturesDir+'/test_cert.pem');
20+
constkey=fs.readFileSync(common.fixturesDir+'/test_key.pem');
21+
constserver=tls.createServer({cert: cert,key: key},common.fail);
22+
consterrors=[];
23+
letstderr='';
2424

2525
server.listen(0,'127.0.0.1',function(){
26-
varaddress=this.address().address+':'+this.address().port;
27-
varargs=['s_client',
26+
constaddress=this.address().address+':'+this.address().port;
27+
constargs=['s_client',
2828
'-ssl3',
2929
'-connect',address];
3030

3131
// for the performance and stability issue in s_client on Windows
3232
if(common.isWindows)
3333
args.push('-no_rand_screen');
3434

35-
varclient=spawn(common.opensslCli,args,{stdio: 'pipe'});
35+
constclient=spawn(common.opensslCli,args,{stdio: 'pipe'});
3636
client.stdout.pipe(process.stdout);
3737
client.stderr.pipe(process.stderr);
3838
client.stderr.setEncoding('utf8');
3939
client.stderr.on('data',(data)=>stderr+=data);
4040

4141
client.once('exit',common.mustCall(function(exitCode){
42-
assert.equal(exitCode,1);
42+
assert.strictEqual(exitCode,1);
4343
server.close();
4444
}));
4545
});
@@ -50,7 +50,7 @@ process.on('exit', function(){
5050
if(/unknownoption-ssl3/.test(stderr)){
5151
common.skip('`openssl s_client -ssl3` not supported.');
5252
}else{
53-
assert.equal(errors.length,1);
53+
assert.strictEqual(errors.length,1);
5454
assert(/:wrongversionnumber/.test(errors[0].message));
5555
}
5656
});

0 commit comments

Comments
(0)