Skip to content

Commit

Permalink
test: replace anonymous function with arrow func
Browse files Browse the repository at this point in the history
PR-URL: #24525
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
codegagan authored and targos committed Nov 24, 2018
1 parent 85c1d62 commit ebd50bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-https-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 = https.createServer(options, common.mustCall(function(req, res) {
const server = https.createServer(options, common.mustCall((req, res) => {
res.end('Goodbye');
}, 2));

Expand All @@ -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();
Expand All @@ -58,7 +58,7 @@ server.listen(0, function() {
'\r\n');
});

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

const opts = {
Expand All @@ -67,15 +67,15 @@ 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' +
'Server: 127.0.0.1\r\n' +
'\r\n');
});

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

0 comments on commit ebd50bf

Please sign in to comment.