diff options
author | Pushkal B <pushkalb123@gmail.com> | 2018-11-17 18:19:08 +0530 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-17 20:49:12 -0800 |
commit | b3b5fc7c065c6aba1eca34a61dd085c2987a55f5 (patch) | |
tree | 75af80c406458dd67b2d95a2c91df5a72ca0659b /test/parallel/test-stream-pipe-flow.js | |
parent | 38e59466a232ad7da7c7ad7065ab5a571e6bfd81 (diff) | |
download | android-node-v8-b3b5fc7c065c6aba1eca34a61dd085c2987a55f5.tar.gz android-node-v8-b3b5fc7c065c6aba1eca34a61dd085c2987a55f5.tar.bz2 android-node-v8-b3b5fc7c065c6aba1eca34a61dd085c2987a55f5.zip |
test: use arrow functions for callbacks
PR-URL: https://github.com/nodejs/node/pull/24444
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/parallel/test-stream-pipe-flow.js')
-rw-r--r-- | test/parallel/test-stream-pipe-flow.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-stream-pipe-flow.js b/test/parallel/test-stream-pipe-flow.js index 1f8564182a..b696821c0d 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); }); |