Skip to content

Commit 76b25f1

Browse files
committed
use wait-port
1 parent e98bf8f commit 76b25f1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/e2e-tests/test-applications/sveltekit/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"tslib": "^2.4.1",
2323
"typescript": "^5.0.0",
2424
"vite": "^4.2.0",
25+
"wait-port": "1.0.4",
2526
"ts-node": "10.9.1",
2627
"@playwright/test": "^1.27.1"
2728
},

packages/e2e-tests/test-applications/sveltekit/playwright.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@ const config: PlaywrightTestConfig = {
5555
/* Run your local dev server before starting the tests */
5656
webServer: [
5757
{
58-
command: 'yarn ts-node --esm start-event-proxy.ts',
58+
command: 'pnpm ts-node --esm start-event-proxy.ts',
5959
port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO) + Number(process.env.PORT_GAP),
6060
},
6161
{
62-
command: testEnv === 'development' ? `yarn dev --port ${port}` : `yarn preview --port ${port}`,
62+
command:
63+
testEnv === 'development'
64+
? `pnpm wait-port ${port} && pnpm dev --port ${port}`
65+
: `pnpm wait-port ${port} && pnpm preview --port ${port}`,
6366
port,
6467
},
6568
],

0 commit comments

Comments
 (0)