Skip to content

Commit b5a8c7f

Browse files
committed
test: replace anonymous functions with arrows
1 parent 1066b68 commit b5a8c7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
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

@@ -29,12 +29,12 @@ TCPWrap.prototype.unref = function() {
2929

3030
echoServer.listen(0);
3131

32-
echoServer.on('listening', function() {
32+
echoServer.on('listening', () => {
3333
const sock = new net.Socket();
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)