T013
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
|
||||
// ESM-compatible __dirname
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests/e2e',
|
||||
@@ -11,7 +17,8 @@ export default defineConfig({
|
||||
trace: 'on-first-retry'
|
||||
},
|
||||
webServer: {
|
||||
command: 'pnpm preview',
|
||||
// Build then preview to ensure static output exists
|
||||
command: 'pnpm build && pnpm preview',
|
||||
cwd: __dirname,
|
||||
port: 4173,
|
||||
reuseExistingServer: !process.env.CI
|
||||
|
||||
Reference in New Issue
Block a user