mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user