import { defineConfig, devices } from '@playwright/test' import { appServerReady } from '@tanstack/router-e2e-utils' const PORT = Number(process.env.E2E_APP_PORT ?? 0) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './tests', workers: 1, reporter: [['line']], use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, wait: appServerReady, reuseExistingServer: false, stdout: 'pipe', }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], })