test: the preview server binds where the dev server does, so both are reachable

This commit is contained in:
2026-08-16 17:21:15 -07:00
committed by zooqueen
parent cd6bc6b3c1
commit 62d3ae6622
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"test": "node -r esbuild-register ../../../node_modules/.bin/playwright test simple.integration.test.js",
"test:web": "bun run test",
"build:prod": "vite build",
"preview": "vite preview",
"preview": "vite preview --host",
"dev": "NODE_ENV=development vite --host --clearScreen false",
"dev:extract": "EXTRACT=1 bun run dev",
"prod": "NODE_ENV=production webpack --json=dist/compilation-stats.json"
@@ -5,11 +5,10 @@ import waitPort from 'wait-port'
const devPort = 5008
const prodPort = 5009
// Each test here starts a server and then waits on the page for up to 45s, and
// the prod one compiles the app before it can even do that. Playwright's default
// 30s is smaller than the waits inside a single test, so the budget only held
// while the machine was idle: under the rest of the workspace building alongside
// it, the prod test spent 27s watching for the preview port and was cut off.
// Each test starts a server and then waits on the page for up to 45s, and the
// prod one compiles the app before it can do either. The budget covers all of
// that, because Playwright's default 30s is smaller than the waits written
// inside a single test here.
test.describe.configure({ timeout: 180_000 })
function spawnServer(command, args) {