20 lines
634 B
TypeScript
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,
|
|
}
|