node-postgres/test/communication-tests.js
brianc 4566a3563b added failing test for stream being passed into connection
this will allow testing of incoming and outgoing stream data without
resorting to monkey patching
2010-10-05 23:42:41 -05:00

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);
});