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

playwright.config.ts

28 lines649 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 globalSetup: './tests/setup/global.setup.ts',
12 use: { baseURL },
13 webServer: {
14 command: 'pnpm dev:e2e',
15 wait: appServerReady,
16 reuseExistingServer: false,
17 stdout: 'pipe',
18 env: {
19 VITE_NODE_ENV: 'test',
20 },
21 },
22 projects: [
23 {
24 name: 'chromium',
25 use: { ...devices['Desktop Chrome'] },
26 },
27 ],
28})