Skip to content

Commit c177799

Browse files
lshanmugrvagg
authored andcommitted
test: change callback function to arrow function
PR-URL: #24421 Reviewed-By: Ouyang Yadong <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent ffb5e5d commit c177799

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-stream-unshift-empty-chunk.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ let nChunks = 10;
3232
const chunk = Buffer.alloc(10, 'x');
3333

3434
r._read = function(n) {
35-
setImmediate(function() {
35+
setImmediate(() => {
3636
r.push(--nChunks === 0 ? null : chunk);
3737
});
3838
};
3939

4040
let readAll = false;
4141
const seen = [];
42-
r.on('readable', function() {
42+
r.on('readable', () => {
4343
let chunk;
4444
while (chunk = r.read()) {
4545
seen.push(chunk.toString());
@@ -74,7 +74,7 @@ const expect =
7474
'xxxxxxxxxx',
7575
'yyyyy' ];
7676

77-
r.on('end', function() {
77+
r.on('end', () => {
7878
assert.deepStrictEqual(seen, expect);
7979
console.log('ok');
8080
});

0 commit comments

Comments
 (0)