Skip to content

Commit

Permalink
test: use arrow syntax for anonymous callbacks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shubhamurkade authored and BethGriggs committed Feb 12, 2019
1 parent e356ce8 commit d4b1666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-net-persistent-ref-unref.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down Expand Up @@ -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();
});
Expand Down

0 comments on commit d4b1666

Please sign in to comment.