Skip to content

Commit 1cd73a8

Browse files
NoSkillGirlrvagg
authored andcommitted
test: using arrow functions
- Using arrow functions in test-tls-client-resume.js - Fixed error, Expected parentheses around arrow function argument arrow-parens PR-URL: #24436 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b309dd2 commit 1cd73a8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎test/parallel/test-tls-client-resume.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const options = {
3838
};
3939

4040
// create server
41-
constserver=tls.Server(options,common.mustCall(function(socket){
41+
constserver=tls.Server(options,common.mustCall((socket)=>{
4242
socket.end('Goodbye');
4343
},2));
4444

@@ -49,13 +49,13 @@ server.listen(0, function() {
4949
constclient1=tls.connect({
5050
port: this.address().port,
5151
rejectUnauthorized: false
52-
},function(){
52+
},()=>{
5353
console.log('connect1');
5454
assert.ok(!client1.isSessionReused(),'Session *should not* be reused.');
5555
session1=client1.getSession();
5656
});
5757

58-
client1.on('close',function(){
58+
client1.on('close',()=>{
5959
console.log('close1');
6060

6161
constopts={
@@ -64,12 +64,12 @@ server.listen(0, function() {
6464
session: session1
6565
};
6666

67-
constclient2=tls.connect(opts,function(){
67+
constclient2=tls.connect(opts,()=>{
6868
console.log('connect2');
6969
assert.ok(client2.isSessionReused(),'Session *should* be reused.');
7070
});
7171

72-
client2.on('close',function(){
72+
client2.on('close',()=>{
7373
console.log('close2');
7474
server.close();
7575
});

0 commit comments

Comments
 (0)