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}`
6/**
7 * See https://playwright.dev/docs/test-configuration.
8 */
9export default defineConfig({
10 testDir: './tests',
11β
12 workers: 1,
13β
14 reporter: [['line']],
15β
16 use: {
17 /* Base URL to use in actions like `await page.goto('/')`. */
18 baseURL,
19 },
20β
21 webServer: {
22 command: `pnpm build && pnpm preview --port ${PORT}`,
23 wait: appServerReady,
24 reuseExistingServer: false,
25 stdout: 'pipe',
26 },
27β
28 projects: [
29 {
30 name: 'chromium',
31 use: { ...devices['Desktop Chrome'] },
32 },
33 ],
34})