Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Squash] Fix nits
  • Loading branch information
jasnell committed Aug 3, 2017
commit a03fa00cf3a8437ae9a4527bb427147d955deadd
7 changes: 3 additions & 4 deletions test/parallel/test-zlib-random-byte-pipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,15 @@ class HashStream extends Stream {

write(c) {
// Simulate the way that an fs.ReadStream returns false
// on *every* write like a jerk, only to resume a
// moment later.
// on *every* write, only to resume a moment later.
this._hasher.update(c);
process.nextTick(this.resume.bind(this));
process.nextTick(() => this.resume());
return false;
}

resume() {
this.emit('resume');
process.nextTick(this.emit.bind(this, 'drain'));
process.nextTick(() => this.emit('drain'));
}

end(c) {
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ testKeys.forEach(common.mustCall((file) => {
buf.on('data', common.mustCall((c) => {
const msg = `${file} ${chunkSize} ${
JSON.stringify(opts)} ${Def.name} -> ${Inf.name}`;
let ok = true;
let i;
for (i = 0; i < Math.max(c.length, test.length); i++) {
if (c[i] !== test[i]) {
Expand Down