Skip to content

Commit

Permalink
test: use arrow functions for callbacks
Browse files Browse the repository at this point in the history
PR-URL: nodejs#24444
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
pushkalb123 authored and refack committed Jan 10, 2019
1 parent d229d54 commit 5ad8cb2
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 5ad8cb2

Please sign in to comment.