mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
e2e: overwrite webserver config with env
This commit is contained in:
@@ -2,6 +2,7 @@ import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
const baseUrl = process.env.TEST_URL || "http://localhost:28623";
|
||||
const startCommand = process.env.TEST_START_COMMAND || "bun run dev";
|
||||
const autoStart = ["1", "true", undefined].includes(process.env.TEST_AUTO_START);
|
||||
|
||||
export default defineConfig({
|
||||
testMatch: "**/*.e2e-spec.ts",
|
||||
@@ -30,9 +31,11 @@ export default defineConfig({
|
||||
use: { ...devices["Desktop Safari"] },
|
||||
}, */
|
||||
],
|
||||
webServer: {
|
||||
command: startCommand,
|
||||
url: baseUrl,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
webServer: autoStart
|
||||
? {
|
||||
command: startCommand,
|
||||
url: baseUrl,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user