Replace __dirname with import.meta.url (required by "type": "module"). Replace --wait flag with manual health polling (unsupported by podman-compose). Use explicit -p project name to isolate test containers from dev environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
import { readFileSync } from 'node:fs'
|
|
import { dirname, resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
interface Fixtures {
|
|
gameId: number
|
|
runId: number
|
|
genlockeId: number
|
|
}
|
|
|
|
let cached: Fixtures | null = null
|
|
|
|
export function loadFixtures(): Fixtures {
|
|
if (cached) return cached
|
|
const raw = readFileSync(resolve(__dirname, '.fixtures.json'), 'utf-8')
|
|
cached = JSON.parse(raw) as Fixtures
|
|
return cached
|
|
}
|