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)
5β
6const baseURL = `http://localhost:${PORT}`
7β
8export default defineConfig({
9 testDir: './tests',
10 workers: 1,
11β
12 reporter: [['line']],
13β
14 use: {
15 baseURL,
16 },
17β
18 webServer: {
19 command: `pnpm build && PORT=${PORT} pnpm start`,
20 wait: appServerReady,
21 reuseExistingServer: false,
22 stdout: 'pipe',
23 env: {
24 NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`,
25 },
26 },
27β
28 projects: [
29 {
30 name: 'chromium',
31 use: { ...devices['Desktop Chrome'] },
32 },
33 ],
34})