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

Function getCode

__tests__/ui-filecode-api.test.ts:63–68  ·  view source on GitHub ↗
(file: string, expected = 200)

Source from the content-addressed store, hash-verified

61}
62
63async function getCode(file: string, expected = 200): Promise<any> {
64 const res = await request(`/api/filecode/${file}`);
65 expect(res.type).toBe('application/json; charset=utf-8');
66 expect(res.status).toBe(expected);
67 return JSON.parse(res.body);
68}
69
70function write(root: string, rel: string, body: string): void {
71 const full = path.join(root, rel);

Callers 1

Calls 2

parseMethod · 0.80
requestFunction · 0.70

Tested by

no test coverage detected