From 7f29638c10705043a0d3000cb325df662238cf48 Mon Sep 17 00:00:00 2001 From: vincanger <70215737+vincanger@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:07:04 +0100 Subject: [PATCH] add conditional webserver when in CI env --- app/playwright.config.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/playwright.config.ts b/app/playwright.config.ts index 8a19385d..5fe233a6 100644 --- a/app/playwright.config.ts +++ b/app/playwright.config.ts @@ -71,11 +71,13 @@ export default defineConfig({ // }, ], - webServer: { - command: 'npm run example-app:start', - // Wait for the backend to start - url: 'http://localhost:3001', - reuseExistingServer: !process.env.CI, - timeout: 120 * 1000, - }, + webServer: process.env.CI + ? { + command: 'npm run example-app:start', + // Wait for the backend to start + url: 'http://localhost:3001', + reuseExistingServer: !process.env.CI, + timeout: 120 * 1000, + } + : undefined, });