Use env vars for test connection in cf tests

This commit is contained in:
Brian Carlson 2025-04-21 17:06:58 -05:00
parent 2969c15fed
commit 0d6c737c87

View File

@ -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')