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

playwright.config.ts

30 lines807 Bytes

1import { defineConfig } from '@playwright/test'
2​
3const production = process.env.MIGRATION_PRODUCTION === '1'
4const env = {
5 SESSION_PASSWORD: 'migration-reference-test-secret-at-least-32-characters',
6 DEMO_PASSWORD: 'migration-test-password',
7}
8​
9export default defineConfig({
10 testDir: './tests',
11 use: { browserName: 'chromium' },
12 projects: [
13 { name: 'next', use: { baseURL: 'http://localhost:3100' } },
14 { name: 'start', use: { baseURL: 'http://localhost:3101' } },
15 ],
16 webServer: [
17 {
18 command: production ? 'pnpm start:next' : 'pnpm dev:next',
19 url: 'http://localhost:3100',
20 env,
21 timeout: 120_000,
22 },
23 {
24 command: production ? 'PORT=3101 pnpm start' : 'pnpm dev',
25 url: 'http://localhost:3101',
26 env,
27 timeout: 120_000,
28 },
29 ],
30})