Skip to content

Commit c177799

Browse files
lshanmugrvagg
authored andcommitted
test: change callback function to arrow function
PR-URL: #24421 Reviewed-By: Ouyang Yadong <oyydoibh@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 ffb5e5d commit c177799

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ let nChunks = 10;
3232
constchunk=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
letreadAll=false;
4141
constseen=[];
42-
r.on('readable',function(){
42+
r.on('readable',()=>{
4343
letchunk;
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)