Skip to content

Commit b5fe8dd

Browse files
committed
test: fix broken test
1 parent 1c13a92 commit b5fe8dd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/pg/test/integration/client/timezone-tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pool.connect(function (err, client, done) {
2121
})
2222
})
2323

24-
suite.testAsync('date comes out as a date', async function () {
24+
suite.testAsync('date comes out as a string', async function () {
2525
const { rows } = await client.query('SELECT NOW()::DATE AS date')
26-
assert(rows[0].date instanceof Date)
26+
assert.equal(typeof rows[0].date, 'string')
2727
})
2828

2929
suite.test('timestamp with time zone', function (cb) {

packages/pg/test/unit/client/throw-in-type-parser-tests.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ const suite = new helper.Suite()
88

99
var typeParserError = new Error('TEST: Throw in type parsers')
1010

11-
types.setTypeParser('special oid that will throw', function () {
11+
// when -1 becomes an actual type, replace it with something else
12+
var invalidTypeOid = -1
13+
14+
types.setTypeParser(invalidTypeOid, function () {
1215
throw typeParserError
1316
})
1417

@@ -20,7 +23,7 @@ const emitFakeEvents = (con) => {
2023
fields: [
2124
{
2225
name: 'boom',
23-
dataTypeID: 'special oid that will throw',
26+
dataTypeID: invalidTypeOid,
2427
},
2528
],
2629
})

0 commit comments

Comments
 (0)