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

Function parseJson

test/commands/store-git.test.ts:94–102  ·  view source on GitHub ↗
(result: RunCLIResult)

Source from the content-addressed store, hash-verified

92 }
93
94 function parseJson(result: RunCLIResult): any {
95 try {
96 return JSON.parse(result.stdout);
97 } catch (error) {
98 throw new Error(
99 `Could not parse JSON.\nCommand: ${result.command}\nstdout:\n${result.stdout}\nstderr:\n${result.stderr}\n${String(error)}`
100 );
101 }
102 }
103
104 it('defaults to Git without prompting in interactive setup', async () => {
105 process.env = {

Callers 1

store-git.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected