Skip to content

Commit 0894899

Browse files
ShubhamurkadeBridgeAR
authored andcommitted
test: use arrow syntax for anonymous callbacks
PR-URL: #24691 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 87c864c commit 0894899

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-net-persistent-ref-unref.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const net = require('net');
66
const { internalBinding } = require('internal/test/binding');
77
const TCPWrap = internalBinding('tcp_wrap').TCP;
88

9-
const echoServer = net.createServer(function(conn) {
9+
const echoServer = net.createServer((conn) => {
1010
conn.end();
1111
});
1212

@@ -34,7 +34,7 @@ echoServer.on('listening', function() {
3434
sock.unref();
3535
sock.ref();
3636
sock.connect(this.address().port);
37-
sock.on('end', function() {
37+
sock.on('end', () => {
3838
assert.strictEqual(refCount, 0);
3939
echoServer.close();
4040
});

0 commit comments

Comments
 (0)