import { defineConfig, devices } from "@playwright/test"; const baseURL = process.env.BASE_URL ?? "http://localhost:4321"; const isRemote = Boolean(process.env.BASE_URL); export default defineConfig({ testDir: "./tests", timeout: 15_000, use: { baseURL }, webServer: isRemote ? undefined : { command: "npm run preview", url: "http://localhost:4321", reuseExistingServer: true, timeout: 30_000, }, projects: [ { name: "desktop", use: { ...devices["Desktop Chrome"] } }, { name: "mobile", use: { ...devices["Pixel 5"] } }, ], });