★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/c1777990aeNouvelle 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 rvagg committed Nov 28, 2018
1 parent ffb5e5d commit c1777990aef6a86cb57fe4e82b442606c32b164f
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 c177799

Please sign in to comment.