import { defineConfig, devices } from "@playwright/test"; const port = 4321; const baseURL = `http://127.0.0.1:${port}`; export default defineConfig({ testDir: "tests/e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, workers: process.env.CI ? 1 : undefined, reporter: process.env.CI ? "github" : "list", timeout: 60_000, use: { baseURL, trace: "on-first-retry", ...devices["Desktop Chrome"], }, webServer: { command: `bunx astro preview --host 127.0.0.1 --port ${port}`, url: baseURL, reuseExistingServer: !process.env.CI, timeout: 120_000, }, });