Skip to content

Commit

Permalink
Fix tests for Node master / citgm
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Feb 9, 2018
1 parent 41a3301 commit 7dc90fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions build/test-replacements.js
Expand Up @@ -337,3 +337,10 @@ module.exports['test-stream-unpipe-event.js'] = [
'if (process.version.indexOf(\'v0.8\') === 0) { process.exit(0) }\n'
]
]

module.exports['test-stream2-unpipe-leak.js'] = [
[
/console\.error\(src\._readableState\);/g,
'// console.error(src._readableState);'
]
]
4 changes: 2 additions & 2 deletions test/parallel/test-stream2-unpipe-leak.js
Expand Up @@ -89,10 +89,10 @@ assert.strictEqual(dest.listeners('error').length, 0);
assert.strictEqual(dest.listeners('close').length, 0);
assert.strictEqual(dest.listeners('finish').length, 0);

console.error(src._readableState);
// console.error(src._readableState);
process.on('exit', function () {
src._readableState.buffer.length = 0;
console.error(src._readableState);
// console.error(src._readableState);
assert(src._readableState.length >= src._readableState.highWaterMark);
console.log('ok');
});

0 comments on commit 7dc90fe

Please sign in to comment.