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