summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNoSkillGirl <singhpooja240393@gmail.com>2018-11-21 05:14:49 +0530
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-22 08:54:34 +0100
commit282e533636337ecbbb301d9c44686d19cc1c7465 (patch)
tree1764dbbcde2a831d65f922183b7acf2a79d74202 /test
parent0fad875b3785123cc382f13c60df471985e403e5 (diff)
downloadandroid-node-v8-282e533636337ecbbb301d9c44686d19cc1c7465.tar.gz
android-node-v8-282e533636337ecbbb301d9c44686d19cc1c7465.tar.bz2
android-node-v8-282e533636337ecbbb301d9c44686d19cc1c7465.zip
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 <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-tls-client-resume.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-tls-client-resume.js b/test/parallel/test-tls-client-resume.js
index 296df88e9f..db4c898d74 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();
});