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

Function parseRecordedJsonBody

packages/server-e2e/test/client.test.ts:598–604  ·  view source on GitHub ↗
(call: FetchCall | undefined)

Source from the content-addressed store, hash-verified

596}
597
598function parseRecordedJsonBody(call: FetchCall | undefined): unknown {
599 const body = call?.init.body;
600 if (typeof body !== 'string') {
601 throw new TypeError('expected recorded fetch body to be a JSON string');
602 }
603 return JSON.parse(body) as unknown;
604}
605
606function okEnvelope<T>(data: T): { code: 0; msg: string; data: T; request_id: string } {
607 return { code: 0, msg: 'success', data, request_id: 'req_test' };

Callers 1

client.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected