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 codebytere committed Jan 29, 2019
1 parent f4c2d9e commit 39a561b
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 39a561b

Please sign in to comment.