diff --git a/@app/__tests__/helpers.ts b/@app/__tests__/helpers.ts index a73f5c1a..13d81063 100644 --- a/@app/__tests__/helpers.ts +++ b/@app/__tests__/helpers.ts @@ -1,6 +1,6 @@ import { Pool, PoolClient } from "pg"; -const pools = {}; +const pools: { [key: string]: Pool } = {}; if (!process.env.TEST_DATABASE_URL) { throw new Error("Cannot run tests without a TEST_DATABASE_URL"); diff --git a/@app/server/__tests__/helpers.ts b/@app/server/__tests__/helpers.ts index f28c06db..61c93f4f 100644 --- a/@app/server/__tests__/helpers.ts +++ b/@app/server/__tests__/helpers.ts @@ -25,8 +25,8 @@ export async function createUserAndLogIn() { const pool = poolFromUrl(process.env.TEST_DATABASE_URL!); const client = await pool.connect(); try { - const [user] = await createUsers(pool, 1, true); - const session = await createSession(pool, user.id); + const [user] = await createUsers(client, 1, true); + const session = await createSession(client, user.id); return { user, session }; } finally { client.release();