test: replace anonymous function with arrow

PR-URL: https://github.com/nodejs/node/pull/24527
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Gagandeep Singh 2018-11-21 00:17:42 +05:30 committed by Gireesh Punathil
parent fcbff6045e
commit ccd1ed9e91

View File

@ -35,14 +35,14 @@ const options = {
ca: [ fixtures.readKey('ca2-cert.pem') ]
};
const server = tls.createServer(options, function(cleartext) {
const server = tls.createServer(options, (cleartext) => {
cleartext.end('World');
});
server.listen(0, common.mustCall(function() {
const socket = tls.connect({
port: this.address().port,
rejectUnauthorized: false
}, common.mustCall(function() {
}, common.mustCall(() => {
const peerCert = socket.getPeerCertificate();
console.error(util.inspect(peerCert));