Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

playwright.config.ts

24 lines615 Bytes

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​
7export default defineConfig({
8 testDir: './tests',
9 workers: 1,
10 reporter: [['line']],
11 use: { baseURL },
12 webServer: {
13 command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`,
14 wait: appServerReady,
15 reuseExistingServer: false,
16 stdout: 'pipe',
17 },
18 projects: [
19 {
20 name: 'chromium',
21 use: { ...devices['Desktop Chrome'] },
22 },
23 ],
24})