From 1cd73a81fae757563e28167442da4669e102a903 Mon Sep 17 00:00:00 2001 From: NoSkillGirl Date: Wed, 21 Nov 2018 05:14:49 +0530 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/24436 Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- test/parallel/test-tls-client-resume.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-tls-client-resume.js b/test/parallel/test-tls-client-resume.js index 296df88e9f9152..db4c898d746790 100644 --- a/test/parallel/test-tls-client-resume.js +++ b/test/parallel/test-tls-client-resume.js @@ -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)); @@ -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 = { @@ -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(); });