diff --git a/tests/e2e/fixtures/console-gate.ts b/tests/e2e/fixtures/console-gate.ts index fb22c4e3..8c256515 100644 --- a/tests/e2e/fixtures/console-gate.ts +++ b/tests/e2e/fixtures/console-gate.ts @@ -1,6 +1,7 @@ import { test as base, expect } from "@playwright/test"; import fs from "node:fs"; import path from "node:path"; +import { fileURLToPath } from "node:url"; interface AllowlistEntry { pattern: string; @@ -11,7 +12,8 @@ interface Allowlist { patterns: AllowlistEntry[]; } -const ALLOWLIST_PATH = path.join(__dirname, "console-allowlist.json"); +const FIXTURE_DIR = path.dirname(fileURLToPath(import.meta.url)); +const ALLOWLIST_PATH = path.join(FIXTURE_DIR, "console-allowlist.json"); function loadAllowlist(): RegExp[] { const raw = fs.readFileSync(ALLOWLIST_PATH, "utf8");