Open History to see the last commit
1import { defineConfig, devices } from '@playwright/test'
2import { appServerReady } from '@tanstack/router-e2e-utils'
3β
4const PORT = Number(process.env.E2E_APP_PORT ?? 0)
5const baseURL = `http://localhost:${PORT}`
6const command = `pnpm build && pnpm preview --host 0.0.0.0 --port ${PORT}`
7β
8console.info('Running with mode: ', process.env.MODE || 'default')
9β
10/**
11 * See https://playwright.dev/docs/test-configuration.
12 */
13export default defineConfig({
14 testDir: './tests',
15 workers: 1,
16β
17 reporter: [['line']],
18β
19 use: {
20 /* Base URL to use in actions like `await page.goto('/')`. */
21 baseURL,
22 },
23β
24 webServer: {
25 command,
26 wait: appServerReady,
27 reuseExistingServer: false,
28 stdout: 'pipe',
29 env: {
30 MODE: process.env.MODE || '',
31 VITE_MODE: process.env.MODE || '',
32 PORT: String(PORT),
33 },
34 },
35β
36 projects: [
37 {
38 name: 'chromium',
39 use: { ...devices['Desktop Chrome'] },
40 },
41 ],
42})