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

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const options = {
3838
};
3939

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

@@ -49,13 +49,13 @@ server.listen(0, function() {
4949
const client1 = 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
const opts = {
@@ -64,12 +64,12 @@ server.listen(0, function() {
6464
session: session1
6565
};
6666

67-
const client2 = tls.connect(opts, function() {
67+
const client2 = 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)