diff --git a/packages/auth/src/issuer.ts b/packages/auth/src/issuer.ts index 0859b6b4..50f4348e 100644 --- a/packages/auth/src/issuer.ts +++ b/packages/auth/src/issuer.ts @@ -220,7 +220,6 @@ import { StorageRefreshStore } from './refresh.js'; import { - type DeviceGrant, type DeviceGrantSubject, type DeviceStore, hashDeviceCode, diff --git a/packages/core/src/db/test.ts b/packages/core/src/db/test.ts index 3baf8932..318a3e8f 100644 --- a/packages/core/src/db/test.ts +++ b/packages/core/src/db/test.ts @@ -3,11 +3,17 @@ import postgres from 'postgres'; /** * Fail-closed test database connection. * - * Tests must never silently fall back to an ad-hoc localhost database, so - * this throws unless an explicit `TEST_DATABASE_URL` is set. Use an isolated - * database for tests, e.g.: + * Tests must never silently fall back to an ad-hoc localhost database, so this + * throws unless an explicit `TEST_DATABASE_URL` is set. Use a database you do + * not mind losing, migrated fresh: * * TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/nestri + * + * **The same database `DATABASE_URL` names, not a second one.** Route tests + * reach the database through the app, which reads `DATABASE_URL`; core tests + * reach it through here. Two different values put the fixtures in one database + * and the assertions in the other, and the suite then fails in neither half's + * own code with nothing in the output naming the cause. */ export function testDb() { const url = process.env.TEST_DATABASE_URL;