From 1961f1fdc370030ed07f986239b2c7568120a215 Mon Sep 17 00:00:00 2001 From: chrisforrette Date: Fri, 12 Oct 2018 10:08:45 -0700 Subject: [PATCH] test: modernizing test-dgram-listen-after-bind with arrow functions PR-URL: https://github.com/nodejs/node/pull/23500 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/parallel/test-dgram-listen-after-bind.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-dgram-listen-after-bind.js b/test/parallel/test-dgram-listen-after-bind.js index 70a828f32cabe9..6a7e156e008a77 100644 --- a/test/parallel/test-dgram-listen-after-bind.js +++ b/test/parallel/test-dgram-listen-after-bind.js @@ -29,16 +29,16 @@ const socket = dgram.createSocket('udp4'); socket.bind(); let fired = false; -const timer = setTimeout(function() { +const timer = setTimeout(() => { socket.close(); }, 100); -socket.on('listening', function() { +socket.on('listening', () => { clearTimeout(timer); fired = true; socket.close(); }); -socket.on('close', function() { +socket.on('close', () => { assert(fired, 'listening should fire after bind'); });