Skip to content

Commit a2d0ab2

Browse files
committed
Do not run tests for binary mode
1 parent fb499e4 commit a2d0ab2

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

test/integration/client/type-coercion-tests.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,23 +150,25 @@ test("timestampz round trip", function() {
150150
client.on('drain', client.end.bind(client));
151151
});
152152

153-
test('early AD date', function() {
154-
var client = helper.client();
155-
client.on('error', function(err) {
156-
console.log(err);
157-
client.end();
158-
});
153+
if(!helper.config.binary) {
154+
test('early AD & BC date', function() {
155+
var client = helper.client();
156+
client.on('error', function(err) {
157+
console.log(err);
158+
client.end();
159+
});
159160

160-
client.query('SELECT $1::TIMESTAMPTZ as when', ["0062-03-08 14:32:00"], assert.success(function(res) {
161-
assert.equal(res.rows[0].when.getFullYear(), 62);
162-
}))
161+
client.query('SELECT $1::TIMESTAMPTZ as when', ["0062-03-08 14:32:00"], assert.success(function(res) {
162+
assert.equal(res.rows[0].when.getFullYear(), 62);
163+
}))
163164

164-
client.query('SELECT $1::TIMESTAMPTZ as when', ["0062-03-08 14:32:00 BC"], assert.success(function(res) {
165-
assert.equal(res.rows[0].when.getFullYear(), -62);
166-
}))
165+
client.query('SELECT $1::TIMESTAMPTZ as when', ["0062-03-08 14:32:00 BC"], assert.success(function(res) {
166+
assert.equal(res.rows[0].when.getFullYear(), -62);
167+
}))
167168

168-
client.on('drain', client.end.bind(client));
169-
})
169+
client.on('drain', client.end.bind(client));
170+
})
171+
}
170172

171173
helper.pg.connect(helper.config, assert.calls(function(err, client, done) {
172174
assert.isNull(err);

0 commit comments

Comments
 (0)