mirror of
https://github.com/hanzoai/market.git
synced 2026-10-30 14:39:25 +00:00
34 lines
895 B
TypeScript
34 lines
895 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
const port = Number(process.env.PLAYWRIGHT_PORT || 4173)
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL || `http://127.0.0.1:${port}`
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
testMatch: /.*\.pw\.test\.ts/,
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
fullyParallel: true,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : [['list']],
|
|
use: {
|
|
baseURL,
|
|
trace: 'retain-on-failure',
|
|
},
|
|
webServer: process.env.PLAYWRIGHT_BASE_URL
|
|
? undefined
|
|
: {
|
|
command: 'bun run preview -- --host 127.0.0.1 --port 4173',
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
stdout: 'ignore',
|
|
stderr: 'pipe',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
})
|