Files
paste.es/playwright.config.ts

33 lines
952 B
TypeScript
Raw Permalink Normal View History

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [['html'], ['list']],
globalSetup: './tests/e2e/global-setup.ts',
globalTeardown: './tests/e2e/global-teardown.ts',
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'DATABASE_URL=file:./database/hemmelig-test.db npx vite',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
timeout: 60000,
env: {
DATABASE_URL: 'file:./database/hemmelig-test.db',
},
},
});