mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-01 15:49:00 +08:00
6b937948df
- Vitest unit/integration tests for server (22 tests) and shared (14 tests) - Cloudflare Workers integration tests via @cloudflare/vitest-pool-workers (9 tests) - Playwright E2E config with auto webServer startup - GitHub Actions CI: lint → typecheck → test (Node + CF) → E2E - Biome for linting + formatting (replaces ESLint + Prettier) - Unified access log middleware for all API routes - Lefthook pre-commit hooks: lint, typecheck, test - Coverage threshold enforced at 90% (currently 96.9%) - Drizzle D1 migrations generated from schema - Fix pre-existing typecheck errors across all packages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
662 B
TypeScript
29 lines
662 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
timeout: 30000,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
headless: true,
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
],
|
|
webServer: [
|
|
{
|
|
command: 'pnpm --filter @zpan/server dev',
|
|
port: 8222,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
{
|
|
command: 'pnpm --filter @zpan/web dev',
|
|
port: 5173,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
],
|
|
})
|