Fix __dirname ReferenceError in E2E global setup

The root package.json uses "type": "module" (ESM), so __dirname is
not available. Derive it from import.meta.url instead.

https://claude.ai/code/session_01JJckq16HxKozwoh3XDJcQ1
This commit is contained in:
Claude
2026-03-11 19:20:30 +00:00
parent a65b95a068
commit a8b87e405e

View File

@@ -6,7 +6,10 @@
* 2. Seeds the database via the /api/setup endpoint
*/
import { DockerComposeEnvironment, Wait } from 'testcontainers'
import { resolve } from 'path'
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url))
let environment: Awaited<ReturnType<DockerComposeEnvironment['up']>> | undefined