Skip to content

Commit 856a0fc

Browse files
pushkalb123rvagg
authored andcommitted
test: use arrow functions for callbacks
PR-URL: #24444 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent 454883b commit 856a0fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-stream-pipe-flow.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ const { Readable, Writable, PassThrough } = require('stream');
4141
.pipe(new PassThrough({ objectMode: true, highWaterMark: 2 }))
4242
.pipe(new PassThrough({ objectMode: true, highWaterMark: 2 }));
4343

44-
pt.on('end', function() {
44+
pt.on('end', () => {
4545
wrapper.push(null);
4646
});
4747

4848
const wrapper = new Readable({
4949
objectMode: true,
5050
read: () => {
51-
process.nextTick(function() {
51+
process.nextTick(() => {
5252
let data = pt.read();
5353
if (data === null) {
54-
pt.once('readable', function() {
54+
pt.once('readable', () => {
5555
data = pt.read();
5656
if (data !== null) wrapper.push(data);
5757
});

0 commit comments

Comments
 (0)