Skip to content

Commit

Permalink
test: use arrow functions for callbacks
Browse files Browse the repository at this point in the history
PR-URL: #24444
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
pushkalb123 authored and codebytere committed Jan 13, 2019
1 parent 7041488 commit 48e6be0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-stream-pipe-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 48e6be0

Please sign in to comment.