mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Use env vars for test connection in cf tests
This commit is contained in:
parent
2969c15fed
commit
0d6c737c87
@ -1,11 +1,10 @@
|
||||
import { Pool } from 'pg'
|
||||
import { test } from 'vitest'
|
||||
import args from '../../test/cli'
|
||||
import assert from 'node:assert'
|
||||
|
||||
test('default', async () => {
|
||||
const pool = new Pool({
|
||||
connectionString: 'postgres://postgres:password@localhost:5432/postgres',
|
||||
})
|
||||
const pool = new Pool()
|
||||
|
||||
const result = await pool.query('SELECT $1::text as name', ['cloudflare'])
|
||||
assert(result.rows[0].name === 'cloudflare')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user