Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): browser tests no longer pick a port Windows has reserved #24007

MergedZacharon(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/24007/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 3 additions and 2 deletions.

x
0 of 1 viewed, 1 left
3 additions and 2 deletionsapps/web/vite.config.tsModified
View file
@@ -100,8 +100,9 @@
} satisfies TestProjectInlineConfiguration;
​
-// Hash checkout paths to ports 61000-64999; Vitest's fixed port collides under inherited strictPort.
-const browserTestApiPort = 61_000 + ((Hash.string(import.meta.dirname) >>> 0) % 4_000);
+// Hash checkout paths to ports 20000-23999; Vitest's fixed port collides under inherited strictPort.
+// Stay below ephemeral ranges: Windows reserves Hyper-V/WSL blocks there and EACCES is not skipped.
+const browserTestApiPort = 20_000 + ((Hash.string(import.meta.dirname) >>> 0) % 4_000);
​
const browserTestProject = {
extends: true,