Skip to content

Commit 3bfa953

Browse files
kanishk30rvagg
authored andcommitted
test: replace closure with arrow functions
PR-URL: #24440 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 216f751 commit 3bfa953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-stream-big-push.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ let reads = 0;
3434

3535
function _read() {
3636
if (reads === 0) {
37-
setTimeout(function() {
37+
setTimeout(() => {
3838
r.push(str);
3939
}, 1);
4040
reads++;
@@ -61,7 +61,7 @@ assert.strictEqual(chunk, str);
6161
chunk = r.read();
6262
assert.strictEqual(chunk, null);
6363

64-
r.once('readable', function() {
64+
r.once('readable', () => {
6565
// this time, we'll get *all* the remaining data, because
6666
// it's been added synchronously, as the read WOULD take
6767
// us below the hwm, and so it triggered a _read() again,

0 commit comments

Comments
 (0)