Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 2 additions & 2 deletions
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].dateinstanceofDate)
26+
assert.equal(typeofrows[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

Lines changed: 5 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /