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 rvagg committed Nov 28, 2018
1 parent 454883b commit 856a0fc
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 856a0fc

Please sign in to comment.