// The editor test server's base URL. Worktrees run on offset ports (see // scripts/worktree.mjs / WORKTREES.md), so node-side fetches in specs must read // the assigned port from the environment rather than hardcoding one. The // Playwright config sets PLAYWRIGHT_BASE_URL from its PORT; the fallback is the // same PORT (common/lib/ports.mjs) when running without the worktree wrapper. import { portFor } from "yt-dlp-transcript-common/lib/ports.mjs"; export const baseUrl = process.env.PLAYWRIGHT_BASE_URL ?? `http://localhost:${portFor("PORT")}`;