mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
30 lines
809 B
TypeScript
30 lines
809 B
TypeScript
import { type PlaywrightTestConfig, devices } from '@playwright/test'
|
|
|
|
export default {
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
timeout: 10_000,
|
|
retries: process.env.CI ? 1 : undefined,
|
|
workers: process.env.CI ? 3 : undefined,
|
|
use: {
|
|
trace: 'on-first-retry',
|
|
launchOptions: {
|
|
devtools: !process.env.CI,
|
|
},
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
},
|
|
outputDir: './test-results',
|
|
snapshotDir: './test-snapshots',
|
|
forbidOnly: !!process.env.CI,
|
|
reporter: 'list',
|
|
// Run every test in parallel to ensure that tests are isolated
|
|
// and there's no shared state leaking from the shared compilation
|
|
// server or the preview server.
|
|
fullyParallel: true,
|
|
} satisfies PlaywrightTestConfig
|