From 870cdffcc61cc5a52734248e4145a7b6285d3d25 Mon Sep 17 00:00:00 2001 From: Pushkal B Date: Sat, 17 Nov 2018 18:19:08 +0530 Subject: [PATCH 1/2] test: replaced anonymous fns with arrow syntax --- test/parallel/test-stream-pipe-flow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-stream-pipe-flow.js b/test/parallel/test-stream-pipe-flow.js index 1f8564182a3107..69c923d1ca98aa 100644 --- a/test/parallel/test-stream-pipe-flow.js +++ b/test/parallel/test-stream-pipe-flow.js @@ -41,17 +41,17 @@ const { Readable, Writable, PassThrough } = require('stream'); .pipe(new PassThrough({ objectMode: true, highWaterMark: 2 })) .pipe(new PassThrough({ objectMode: true, highWaterMark: 2 })); - pt.on('end', function() { + pt.on('end', () => { wrapper.push(null); }); const wrapper = new Readable({ objectMode: true, read: () => { - process.nextTick(function() { + process.nextTick( () => { let data = pt.read(); if (data === null) { - pt.once('readable', function() { + pt.once('readable', () => { data = pt.read(); if (data !== null) wrapper.push(data); }); From 0f5691ab62a0a9081b1b74aed5562130463f3aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 17 Nov 2018 19:11:25 +0530 Subject: [PATCH 2/2] Update test/parallel/test-stream-pipe-flow.js Co-Authored-By: pushkalb123 --- test/parallel/test-stream-pipe-flow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stream-pipe-flow.js b/test/parallel/test-stream-pipe-flow.js index 69c923d1ca98aa..b696821c0d51fb 100644 --- a/test/parallel/test-stream-pipe-flow.js +++ b/test/parallel/test-stream-pipe-flow.js @@ -48,7 +48,7 @@ const { Readable, Writable, PassThrough } = require('stream'); const wrapper = new Readable({ objectMode: true, read: () => { - process.nextTick( () => { + process.nextTick(() => { let data = pt.read(); if (data === null) { pt.once('readable', () => {