Skip to content

Commit 7e6dd1b

Browse files
committed
Fix tests
1 parent a891603 commit 7e6dd1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ t('Query and parameters are enumerable if debug is set', async() => {
980980

981981
t('connect_timeout works', async() => {
982982
const connect_timeout = 0.2
983-
const server = net.createServer()
983+
const server = require('net').createServer()
984984
server.listen()
985985
const sql = postgres({ port: server.address().port, connect_timeout })
986986
const start = Date.now()
@@ -1076,7 +1076,7 @@ t('no_prepare: true disables prepared transactions', async() => {
10761076
return [0, result.count]
10771077
})
10781078

1079-
o('Catches connection config errors', async() => {
1079+
t('Catches connection config errors', async() => {
10801080
const sql = postgres({ user: { toString: () => { throw new Error('wat') } }, database: 'prut' })
10811081

10821082
return [
@@ -1085,7 +1085,7 @@ o('Catches connection config errors', async() => {
10851085
]
10861086
})
10871087

1088-
o('Catches query format errors', async() => [
1088+
t('Catches query format errors', async() => [
10891089
'wat',
10901090
await sql.unsafe({ toString: () => { throw new Error('wat') } }).catch((e) => e.message)
10911091
])

0 commit comments

Comments
 (0)