Skip to content

test: use available API ports in browser snapshots - #3006

Merged
fengmk2 merged 4 commits into
mainfrom
test/browser-snapshot-ports
Oct 12, 2026
Merged

fengmk2 merged 4 commits into
mainfrom
test/browser-snapshot-ports

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

The browser snapshots use Vitest's fixed API port, which Windows can reserve. This causes intermittent EACCES failures.

Set test.api.port to 0 in a post-configuration hook, after Vitest resolves its defaults. The OS selects an available port when the server binds. This follows vite-task#838 and preserves the snapshot assertions.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://test-browser-snapshot-ports-viteplus-dev.voidzero-docs.workers.dev (commit 70f907a)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3430a696-viteplus-dev.voidzero-docs.workers.dev 70f907a 2026-10-12T10:05:58.181Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://292b4833-viteplus-dev.voidzero-docs.workers.dev 035f081 2026-10-12T09:36:45.107Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://84c058c1-viteplus-dev.voidzero-docs.workers.dev 4b34288 2026-10-12T09:34:44.806Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b0a13b25-viteplus-dev.voidzero-docs.workers.dev 8791448 2026-10-12T07:31:53.435Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9228038b-viteplus-dev.voidzero-docs.workers.dev 4899348 2026-10-12T07:22:28.907Z Visit the dashboard ↗

@wan9chi

wan9chi commented Oct 12, 2026

Copy link
Copy Markdown
Member

There's a simpler solution: voidzero-dev/vite-task#838

@fengmk2

fengmk2 commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@wan9chi done

@fengmk2
fengmk2 force-pushed the test/browser-snapshot-ports branch from 4b34288 to 035f081 Compare October 12, 2026 09:35
@fengmk2
fengmk2 merged commit 205cfab into main Oct 12, 2026
48 checks passed
@fengmk2
fengmk2 deleted the test/browser-snapshot-ports branch October 12, 2026 16:50
@fengmk2 fengmk2 mentioned this pull request Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants