22 lines
692 B
TypeScript
22 lines
692 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const PORT = 4173;
|
|
|
|
/**
|
|
* Browser tests against the production build (Phase 11): service worker,
|
|
* install and offline behaviour can't be tested in jsdom. Run `pnpm build`
|
|
* first; `pnpm e2e` serves dist/ with `vite preview`.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: "e2e",
|
|
testMatch: "**/*.e2e.ts",
|
|
fullyParallel: false,
|
|
retries: process.env.CI ? 1 : 0,
|
|
use: { baseURL: `http://127.0.0.1:${PORT}`, ...devices["Desktop Chrome"] },
|
|
webServer: {
|
|
command: `pnpm exec vite preview --port ${PORT} --strictPort --host 127.0.0.1`,
|
|
url: `http://127.0.0.1:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
});
|