From d4b166668674a9bc821773a80bd37e803f08525e Mon Sep 17 00:00:00 2001 From: Shubham Urkade Date: Tue, 27 Nov 2018 22:55:09 +0530 Subject: [PATCH] test: use arrow syntax for anonymous callbacks PR-URL: https://github.com/nodejs/node/pull/24691 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Gireesh Punathil --- test/parallel/test-net-persistent-ref-unref.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-net-persistent-ref-unref.js b/test/parallel/test-net-persistent-ref-unref.js index d8de7ba3f2877a..b860272910ee1c 100644 --- a/test/parallel/test-net-persistent-ref-unref.js +++ b/test/parallel/test-net-persistent-ref-unref.js @@ -4,7 +4,7 @@ const assert = require('assert'); const net = require('net'); const TCPWrap = process.binding('tcp_wrap').TCP; -const echoServer = net.createServer(function(conn) { +const echoServer = net.createServer((conn) => { conn.end(); }); @@ -32,7 +32,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(); });