import { defineConfig } from '@playwright/test'; export default defineConfig({ testDir: '../../e2e', workers: 1, webServer: [ { command: 'rm -f packages/backend/data/e2e.db data/e2e.db && DB_PATH=./data/e2e.db SMTP_HOST=localhost SMTP_PORT=1025 APP_URL=http://localhost:5173 npm -w @flashcard/backend run db:migrate && DB_PATH=./data/e2e.db SMTP_HOST=localhost SMTP_PORT=1025 APP_URL=http://localhost:5173 npm -w @flashcard/backend run dev', cwd: '../..', port: 3000, reuseExistingServer: false, timeout: 60_000, }, { command: 'npm -w @flashcard/frontend run dev', cwd: '../..', port: 5173, reuseExistingServer: false, timeout: 60_000, }, ], use: { baseURL: 'http://localhost:5173' }, timeout: 30_000, });