Skip to content

Instantly share code, notes, and snippets.

@Raynos

Raynos/output Secret

Created January 13, 2013 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/1e18361d5c9014fd741a to your computer and use it in GitHub Desktop.
Save Raynos/1e18361d5c9014fd741a to your computer and use it in GitHub Desktop.
_read
_read
_read
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