MCPcopy
hub / github.com/Fission-AI/OpenSpec / parseJson

Function parseJson

test/commands/store-root-selection.test.ts:111–119  ·  view source on GitHub ↗
(result: RunCLIResult)

Source from the content-addressed store, hash-verified

109 }
110
111 function parseJson(result: RunCLIResult): any {
112 try {
113 return JSON.parse(result.stdout);
114 } catch (error) {
115 throw new Error(
116 `Could not parse JSON.\nCommand: ${result.command}\nstdout:\n${result.stdout}\nstderr:\n${result.stderr}\n${String(error)}`
117 );
118 }
119 }
120
121 function expectNoLocalOpenSpec(): void {
122 expect(fs.existsSync(path.join(appRepo, 'openspec'))).toBe(false);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected