File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { fileURLToPath } from 'node:url'
33import { defineConfig , devices } from '@playwright/test'
44import type { ConfigOptions } from '@nuxt/test-utils/playwright'
55
6+ const baseURL = 'http://localhost:5678'
7+
68export default defineConfig < ConfigOptions > ( {
79 testDir : './tests' ,
810 fullyParallel : true ,
@@ -11,10 +13,18 @@ export default defineConfig<ConfigOptions>({
1113 workers : process . env . CI ? 1 : undefined ,
1214 reporter : 'html' ,
1315 timeout : 120_000 ,
16+ webServer : {
17+ command : 'NODE_ENV=test pnpm build && pnpm preview --port 5678' ,
18+ url : baseURL ,
19+ reuseExistingServer : false ,
20+ timeout : 60_000 ,
21+ } ,
1422 use : {
23+ baseURL,
1524 trace : 'on-first-retry' ,
1625 nuxt : {
1726 rootDir : fileURLToPath ( new URL ( '.' , import . meta. url ) ) ,
27+ host : baseURL ,
1828 } ,
1929 } ,
2030 projects : [
You can’t perform that action at this time.
0 commit comments