Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: replace anonymous functions with arrows
  • Loading branch information
Shubhamurkade committed Nov 28, 2018
commit b5a8c7ff38065c9d5d4c23855935035df36a73f3
6 changes: 3 additions & 3 deletions test/parallel/test-net-persistent-ref-unref.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

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

echoServer.listen(0);

echoServer.on('listening', function() {
echoServer.on('listening', () => {
const sock = new net.Socket();
sock.unref();
sock.ref();
sock.connect(this.address().port);
sock.on('end', function() {
sock.on('end', () => {
assert.strictEqual(refCount, 0);
echoServer.close();
});
Expand Down