mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
this will allow testing of incoming and outgoing stream data without resorting to monkey patching
18 lines
359 B
JavaScript
18 lines
359 B
JavaScript
require(__dirname+'/test-helper');
|
|
|
|
var MemoryStream = function() {
|
|
EventEmitter.call(this);
|
|
};
|
|
|
|
sys.inherits(MemoryStream, EventEmitter);
|
|
|
|
var p = MemoryStream.prototype;
|
|
|
|
test('client can take existing stream', function() {
|
|
var stream = new MemoryStream();
|
|
var client = new Client({
|
|
stream: stream
|
|
});
|
|
assert.equal(client.stream, stream);
|
|
});
|