Skip to content

Commit

Permalink
test: using arrow functions
Browse files Browse the repository at this point in the history
    - 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>
  • Loading branch information
NoSkillGirl authored and rvagg committed Nov 28, 2018
1 parent b309dd2 commit 1cd73a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-tls-client-resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const options = {
};

// create server
const server = tls.Server(options, common.mustCall(function(socket) {
const server = tls.Server(options, common.mustCall((socket) => {
socket.end('Goodbye');
}, 2));

Expand All @@ -49,13 +49,13 @@ server.listen(0, function() {
const client1 = tls.connect({
port: this.address().port,
rejectUnauthorized: false
}, function() {
}, () => {
console.log('connect1');
assert.ok(!client1.isSessionReused(), 'Session *should not* be reused.');
session1 = client1.getSession();
});

client1.on('close', function() {
client1.on('close', () => {
console.log('close1');

const opts = {
Expand All @@ -64,12 +64,12 @@ server.listen(0, function() {
session: session1
};

const client2 = tls.connect(opts, function() {
const client2 = tls.connect(opts, () => {
console.log('connect2');
assert.ok(client2.isSessionReused(), 'Session *should* be reused.');
});

client2.on('close', function() {
client2.on('close', () => {
console.log('close2');
server.close();
});
Expand Down

0 comments on commit 1cd73a8

Please sign in to comment.