File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1212 "test:watch" : " vitest --config vitest.config.ts" ,
1313 "deploy" : " wrangler deploy" ,
1414 "typecheck" : " tsc --noEmit" ,
15- "test:e2e" : " playwright test"
15+ "test:e2e" : " E2E_PORT=$(node -e \" const s=require('net').createServer();s.listen(0,()=>{console.log(s.address().port);s.close()}) \" ) playwright test"
1616 },
1717 "dependencies" : {
1818 "@octokit/core" : " ^7.0.6" ,
Original file line number Diff line number Diff line change 11import { defineConfig , devices } from "@playwright/test" ;
22
3+ const port = Number ( process . env . E2E_PORT ) || 5173 ;
4+
35export default defineConfig ( {
46 testDir : "./e2e" ,
57 reporter : [ [ "html" , { open : "never" } ] ] ,
68 use : {
7- baseURL : " http://localhost:5173" ,
9+ baseURL : ` http://localhost:${ port } ` ,
810 trace : "on-first-retry" ,
911 } ,
1012 projects : [
@@ -14,8 +16,8 @@ export default defineConfig({
1416 } ,
1517 ] ,
1618 webServer : {
17- command : " pnpm dev" ,
18- port : 5173 ,
19+ command : ` pnpm exec vite dev --port ${ port } ` ,
20+ url : `http://localhost: ${ port } ` ,
1921 timeout : 120_000 ,
2022 reuseExistingServer : ! process . env . CI ,
2123 } ,
You can’t perform that action at this time.
0 commit comments