MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getJson

Function getJson

__tests__/ui-entrypoints-api.test.ts:75–80  ·  view source on GitHub ↗
(instance: Instance, requestPath: string, expected = 200)

Source from the content-addressed store, hash-verified

73}
74
75async function getJson(instance: Instance, requestPath: string, expected = 200): Promise<any> {
76 const res = await request(instance.server.port, requestPath);
77 expect(res.type).toBe('application/json; charset=utf-8');
78 expect(res.status).toBe(expected);
79 return JSON.parse(res.body);
80}
81
82async function serve(root: string, dir: string, cg: CodeGraph): Promise<Instance> {
83 const api = createGraphApi({ projectRoot: root });

Callers 1

Calls 2

parseMethod · 0.80
requestFunction · 0.70

Tested by

no test coverage detected