Add test for pg.types interface
This commit is contained in:
parent
876abe8730
commit
0254fa565f
@ -12,6 +12,7 @@ var PG = function(clientConstructor) {
|
||||
this.Query = this.Client.Query;
|
||||
this.pools = pool;
|
||||
this.Connection = Connection;
|
||||
this.types = require('pg-types');
|
||||
};
|
||||
|
||||
util.inherits(PG, EventEmitter);
|
||||
|
@ -2,6 +2,14 @@ require(__dirname + '/test-helper');
|
||||
var utils = require(__dirname + "/../../lib/utils");
|
||||
var defaults = require(__dirname + "/../../lib").defaults;
|
||||
|
||||
|
||||
test('ensure types is exported on root object', function() {
|
||||
var pg = require('../../lib')
|
||||
assert(pg.types)
|
||||
assert(pg.types.getTypeParser)
|
||||
assert(pg.types.setTypeParser)
|
||||
})
|
||||
|
||||
//this tests the monkey patching
|
||||
//to ensure comptability with older
|
||||
//versions of node
|
||||
|
Loading…
Reference in New Issue
Block a user