MCPcopy Index your code
hub / github.com/TanStack/ai / recordingProcess

Function recordingProcess

packages/ai-sandbox/tests/git-exec.test.ts:14–27  ·  view source on GitHub ↗
(stdout = '')

Source from the content-addressed store, hash-verified

12}
13
14function recordingProcess(stdout = ''): {
15 process: SandboxProcess
16 calls: Array<ExecCall>
17} {
18 const calls: Array<ExecCall> = []
19 const process: SandboxProcess = {
20 exec: (command, options): Promise<ExecResult> => {
21 calls.push({ command, options })
22 return Promise.resolve({ stdout, stderr: '', exitCode: 0 })
23 },
24 spawn: () => Promise.reject(new Error('unused')),
25 }
26 return { process, calls }
27}
28
29describe('createExecBackedGit security', () => {
30 it('rejects a non-positive-integer depth before it reaches the shell', async () => {

Callers 1

git-exec.test.tsFile · 0.85

Calls 2

resolveMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected