diff --git a/playwright.config.ts b/playwright.config.ts index 17e759d..d267d8b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -2,7 +2,7 @@ import { defineConfig, devices } from '@playwright/test' import process from 'node:process' // const runningInVSCode = process.env.TERM_PROGRAM === 'vscode' -const baseURL = process.env.CI ? 'http://localhost:4173' : 'http://localhost:4730' +const baseURL = 'http://localhost:4173' /** * Read environment variables from file. @@ -106,8 +106,8 @@ export default defineConfig({ * Use the preview server on CI for more realistic testing. * Playwright will re-use the local server if there is already a dev-server running. */ - command: process.env.CI ? 'pnpm run preview' : 'pnpm run dev', + command: 'pnpm run build-only; pnpm run preview', port: Number(new URL(baseURL).port), - reuseExistingServer: !process.env.CI, + reuseExistingServer: true /* !process.env.CI */, }, })