Allow non-required dev ports to exceed max in offset search

- Stop `findFirstAvailableOffset` only when a required port exceeds `MAX_PORT`
- Add test covering offsets where only non-required ports are out of range
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-03-01 23:53:31 -08:00
1 parent f239c90628
commit 9f068356a4
2 files changed
+18 -1

No files matched your search

+11
View File
@@ -149,6 +149,17 @@ describe("findFirstAvailableOffset", () => {
expect(offset).toBe(2);
});
it("allows offsets where only non-required ports exceed max", async () => {
const offset = await findFirstAvailableOffset({
startOffset: 59_803,
requireServerPort: true,
requireWebPort: false,
checkPortAvailability: async () => true,
});
expect(offset).toBe(59_803);
});
});
describe("resolveModePortOffsets", () => {