feat: add --dev/--profile CLI profiles

This commit is contained in:
Peter Steinberger
2026-01-05 01:25:37 +01:00
parent f601dac30d
commit c6de1b1f7d
19 changed files with 516 additions and 25 deletions

View File

@@ -64,6 +64,17 @@ describe("port allocation", () => {
expect(allocateCdpPort(usedPorts)).toBe(CDP_PORT_RANGE_START);
});
it("allocates within an explicit range", () => {
const usedPorts = new Set<number>();
expect(allocateCdpPort(usedPorts, { start: 20000, end: 20002 })).toBe(
20000,
);
usedPorts.add(20000);
expect(allocateCdpPort(usedPorts, { start: 20000, end: 20002 })).toBe(
20001,
);
});
it("skips used ports and returns next available", () => {
const usedPorts = new Set([CDP_PORT_RANGE_START, CDP_PORT_RANGE_START + 1]);
expect(allocateCdpPort(usedPorts)).toBe(CDP_PORT_RANGE_START + 2);