MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / getTestPort

Function getTestPort

test/integration/setup.ts:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16let proxyHandle: ProxyHandle | undefined;
17
18function getTestPort(): number {
19 // Keep worker 1 on the historical default (8402), then offset others.
20 const workerRaw = process.env.VITEST_POOL_ID ?? process.env.VITEST_WORKER_ID ?? "1";
21 const workerId = Number.parseInt(workerRaw, 10);
22 if (Number.isInteger(workerId) && workerId >= 1) {
23 return 8401 + workerId;
24 }
25 return 8402;
26}
27
28/**
29 * Start the test proxy on a worker-scoped port.

Callers 1

startTestProxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected