← back to Govarbitrage
playwright.config.ts
21 lines
import { defineConfig, devices } from "@playwright/test";
const PORT = process.env.E2E_PORT || "3010";
const baseURL = `http://localhost:${PORT}`;
export default defineConfig({
testDir: "./tests/e2e",
timeout: 30_000,
fullyParallel: true,
reporter: "list",
use: { baseURL, trace: "on-first-retry" },
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
// Build + start the production server for E2E. Reuses an already-running one.
webServer: {
command: `npm run build && PORT=${PORT} npm run start`,
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 180_000,
},
});