24 lines
714 B
TypeScript
24 lines
714 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: 'tests/e2e',
|
|
workers: 1, // Mock server holds shared state; revisit when suite grows past ~50 tests.
|
|
// WARNING: kill any standalone `pnpm dev` running on :5173 before
|
|
// `pnpm test:e2e` — `reuseExistingServer` would pick it up and bypass
|
|
// NODE_ENV=test, silently routing tests to the real backend.
|
|
webServer: [
|
|
{
|
|
command: 'pnpm mock',
|
|
port: 4010,
|
|
reuseExistingServer: !process.env.CI
|
|
},
|
|
{
|
|
command: 'pnpm dev',
|
|
port: 5173,
|
|
reuseExistingServer: !process.env.CI
|
|
}
|
|
],
|
|
use: { baseURL: 'http://localhost:5173' },
|
|
projects: [{ name: 'chromium', use: devices['Desktop Chrome'] }]
|
|
});
|