-
-
Save Raynos/1e18361d5c9014fd741a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_read | |
_read | |
_read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('low watermark _read', function (t) { | |
var r = new Readable({ | |
isObjectStream: true, | |
lowWaterMark: 2, | |
highWaterMark: 4 | |
}); | |
var calls = 0; | |
r._read = function (n, cb) { | |
console.log("_read") | |
calls++; | |
cb(null, "foo"); | |
}; | |
// touch to cause it | |
r.read() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment