mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: use arrow syntax for anonymous callbacks
PR-URL: https://github.com/nodejs/node/pull/24691 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
1 parent
1cff573caf
commit
cdaa2bbe93
1 file changed
+2
-2
@@ -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();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user