Files
perauset-e2e-mrg0et1k/e2e/tests/support/config.ts
2026-07-11 08:54:43 +02:00

20 lines
634 B
TypeScript

import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
export interface TestConfig {
apiUrl: string
/** Path to the SQLite file the e2e backend serves and the steps seed into. */
dbFile: string
timeout: number
}
// `pikku db reset` only operates on files inside .pikku-runtime/, so the e2e db
// lives there (not e2e/.tmp).
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..')
export const config: TestConfig = {
apiUrl: process.env.API_URL || 'http://localhost:6099',
dbFile: process.env.E2E_DB_FILE || resolve(repoRoot, '.pikku-runtime/e2e-api.db'),
timeout: 30_000,
}