summaryrefslogtreecommitdiff
path: root/test/parallel/test-https-client-resume.js
diff options
context:
space:
mode:
authorGagandeep Singh <codegagan@gmail.com>2018-11-20 23:53:56 +0530
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-23 07:29:18 +0100
commit80671dc1f95a1256597a163b14b5c30df9042255 (patch)
treec9cf4bd264fcd4d3aac36cdaf8d642fac3da8160 /test/parallel/test-https-client-resume.js
parent12b69f976525620dde098339477823b35c69d5cd (diff)
downloadandroid-node-v8-80671dc1f95a1256597a163b14b5c30df9042255.tar.gz
android-node-v8-80671dc1f95a1256597a163b14b5c30df9042255.tar.bz2
android-node-v8-80671dc1f95a1256597a163b14b5c30df9042255.zip
test: replace anonymous function with arrow func
PR-URL: https://github.com/nodejs/node/pull/24525 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/parallel/test-https-client-resume.js')
-rw-r--r--test/parallel/test-https-client-resume.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-https-client-resume.js b/test/parallel/test-https-client-resume.js
index 301cb63dc7..04a89364fe 100644
--- a/test/parallel/test-https-client-resume.js
+++ b/test/parallel/test-https-client-resume.js
@@ -38,7 +38,7 @@ const options = {
};
// create server
-const server = https.createServer(options, common.mustCall(function(req, res) {
+const server = https.createServer(options, common.mustCall((req, res) => {
res.end('Goodbye');
}, 2));
@@ -49,7 +49,7 @@ 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();
@@ -58,7 +58,7 @@ server.listen(0, function() {
'\r\n');
});
- client1.on('close', function() {
+ client1.on('close', () => {
console.log('close1');
const opts = {
@@ -67,7 +67,7 @@ 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.write('GET / HTTP/1.0\r\n' +
@@ -75,7 +75,7 @@ server.listen(0, function() {
'\r\n');
});
- client2.on('close', function() {
+ client2.on('close', () => {
console.log('close2');
server.close();
});