| 1 | import { defineConfig, devices } from '@playwright/test'; |
| 2 | |
| 3 | export default defineConfig({ |
| 4 | testDir: './tests/e2e', |
| 5 | testMatch: '*.ts', |
| 6 | testIgnore: '_fixtures.ts', |
| 7 | fullyParallel: true, |
| 8 | workers: 3, |
| 9 | forbidOnly: !!process.env.CI, |
| 10 | retries: process.env.CI ? 1 : 0, |
| 11 | reporter: process.env.CI ? 'github' : 'list', |
| 12 | timeout: 10_000, |
| 13 | |
| 14 | use: { |
| 15 | baseURL: 'http://localhost:4321', |
| 16 | trace: 'on-first-retry', |
| 17 | ...devices['Desktop Chrome'], |
| 18 | }, |
| 19 | |
| 20 | webServer: { |
| 21 | command: 'bun run preview', |
| 22 | port: 4321, |
| 23 | reuseExistingServer: !process.env.CI, |
| 24 | }, |
| 25 | }); |