Skip to content

Commit 4cc91ff

Browse files
apoorvanandBethGriggs
authored andcommitted
test: use arrow functions in callbacks
PR-URL: #24441 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent fe698d8 commit 4cc91ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-stream-pipe-await-drain.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ writer1._write = common.mustCall(function(chunk, encoding, cb) {
2222
cb();
2323
}, 1);
2424

25-
writer1.once('chunk-received', function() {
25+
writer1.once('chunk-received', () => {
2626
assert.strictEqual(
2727
reader._readableState.awaitDrain,
2828
0,
2929
'awaitDrain initial value should be 0, actual is ' +
3030
reader._readableState.awaitDrain
3131
);
32-
setImmediate(function() {
32+
setImmediate(() => {
3333
// This one should *not* get through to writer1 because writer2 is not
3434
// "done" processing.
3535
reader.push(buffer);
3636
});
3737
});
3838

3939
// A "slow" consumer:
40-
writer2._write = common.mustCall(function(chunk, encoding, cb) {
40+
writer2._write = common.mustCall((chunk, encoding, cb) => {
4141
assert.strictEqual(
4242
reader._readableState.awaitDrain,
4343
1,
@@ -49,7 +49,7 @@ writer2._write = common.mustCall(function(chunk, encoding, cb) {
4949
// will return false.
5050
}, 1);
5151

52-
writer3._write = common.mustCall(function(chunk, encoding, cb) {
52+
writer3._write = common.mustCall((chunk, encoding, cb) => {
5353
assert.strictEqual(
5454
reader._readableState.awaitDrain,
5555
2,

0 commit comments

Comments
 (0)