Open History to see the last commit
1import { defineConfig, devices } from '@playwright/test'
2import { appServerReady } from '@tanstack/router-e2e-utils'
3β
4const distDir = process.env.E2E_DIST_DIR ?? 'dist'
5β
6const PORT = Number(process.env.E2E_APP_PORT ?? 0)
7const baseURL = `http://localhost:${PORT}`
8β
9export default defineConfig({
10 testDir: './tests',
11 workers: 1,
12 reporter: [['line']],
13β
14 use: {
15 baseURL,
16 },
17β
18 webServer: {
19 command: '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 PORT: String(PORT),
26 E2E_DIST_DIR: distDir,
27 },
28 },
29β
30 projects: [
31 {
32 name: 'chromium',
33 use: {
34 ...devices['Desktop Chrome'],
35 },
36 },
37 ],
38})