diff --git a/test/parallel/test-net-persistent-ref-unref.js b/test/parallel/test-net-persistent-ref-unref.js index 15b71f6d02fc15..5df661475e3eee 100644 --- a/test/parallel/test-net-persistent-ref-unref.js +++ b/test/parallel/test-net-persistent-ref-unref.js @@ -6,7 +6,7 @@ const net = require('net'); const { internalBinding } = require('internal/test/binding'); const TCPWrap = internalBinding('tcp_wrap').TCP; -const echoServer = net.createServer(function(conn) { +const echoServer = net.createServer((conn) => { conn.end(); }); @@ -34,7 +34,7 @@ echoServer.on('listening', function() { sock.unref(); sock.ref(); sock.connect(this.address().port); - sock.on('end', function() { + sock.on('end', () => { assert.strictEqual(refCount, 0); echoServer.close(); });