From 164069cdb00a2566286a23b7979c3ac1c2843be4 Mon Sep 17 00:00:00 2001 From: kanishk30 Date: Sat, 17 Nov 2018 17:43:28 +0530 Subject: [PATCH] test: replace closure with arrow functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/24440 Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat --- test/parallel/test-stream-big-push.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-stream-big-push.js b/test/parallel/test-stream-big-push.js index 503e830f49fac8..2369fac09aae2a 100644 --- a/test/parallel/test-stream-big-push.js +++ b/test/parallel/test-stream-big-push.js @@ -34,7 +34,7 @@ let reads = 0; function _read() { if (reads === 0) { - setTimeout(function() { + setTimeout(() => { r.push(str); }, 1); reads++; @@ -61,7 +61,7 @@ assert.strictEqual(chunk, str); chunk = r.read(); assert.strictEqual(chunk, null); -r.once('readable', function() { +r.once('readable', () => { // this time, we'll get *all* the remaining data, because // it's been added synchronously, as the read WOULD take // us below the hwm, and so it triggered a _read() again,