MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / daemonReachable

Function daemonReachable

packages/server-e2e/test/session-resume.test.ts:32–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30const PROMPT_TIMEOUT_MS = 120_000;
31
32async function daemonReachable(): Promise<boolean> {
33 try {
34 const res = await fetchWithReport(`${BASE_URL}${API_PREFIX}/meta`, {
35 signal: AbortSignal.timeout(500),
36 });
37 return res.ok;
38 } catch {
39 return false;
40 }
41}
42
43const reachable = await daemonReachable();
44const describeLive = reachable ? describe : describe.skip;

Callers 1

Calls 1

fetchWithReportFunction · 0.85

Tested by

no test coverage detected