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:
parent
fcbff6045e
commit
ccd1ed9e91
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user