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/**
8 * See https://playwright.dev/docs/test-configuration.
9 */
10export default defineConfig({
11 testDir: './tests',
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 && PORT=${PORT} pnpm start`,
23 wait: appServerReady,
24 reuseExistingServer: false,
25 stdout: 'pipe',
26 env: {
27 NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`,
28 },
29 },
30β
31 projects: [
32 {
33 name: 'chromium',
34 use: { ...devices['Desktop Chrome'] },
35 },
36 ],
37})