Skip to content

Commit

Permalink
test: change callback function to arrow function
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
lshanmug authored and rvagg committed Nov 28, 2018
1 parent ffb5e5d commit c177799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-stream-unshift-empty-chunk.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ let nChunks = 10;
const chunk = Buffer.alloc(10, 'x');

r._read = function(n) {
setImmediate(function() {
setImmediate(() => {
r.push(--nChunks === 0 ? null : chunk);
});
};

let readAll = false;
const seen = [];
r.on('readable', function() {
r.on('readable', () => {
let chunk;
while (chunk = r.read()) {
seen.push(chunk.toString());
Expand Down Expand Up @@ -74,7 +74,7 @@ const expect =
'xxxxxxxxxx',
'yyyyy' ];

r.on('end', function() {
r.on('end', () => {
assert.deepStrictEqual(seen, expect);
console.log('ok');
});

0 comments on commit c177799

Please sign in to comment.