★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/39a561b3bcNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

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>
  • Loading branch information...
lshanmug authored and codebytere committed Nov 17, 2018
1 parent f4c2d9e commit 39a561b3bc63c7639ae6b6c5514669339c63201a
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/parallel/test-stream-unshift-empty-chunk.js
@@ -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());
@@ -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.
You can’t perform that action at this time.