MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / createMockCommandResponse

Function createMockCommandResponse

src/test-utils/mock-executors.ts:34–44  ·  view source on GitHub ↗
(
  overrides: Partial<CommandResponse> = {},
)

Source from the content-addressed store, hash-verified

32export const mockProcess = { pid: 12345 } as unknown as ChildProcess;
33
34export function createMockCommandResponse(
35 overrides: Partial<CommandResponse> = {},
36): CommandResponse {
37 return {
38 success: overrides.success ?? true,
39 output: overrides.output ?? '',
40 error: overrides.error,
41 process: overrides.process ?? mockProcess,
42 exitCode: overrides.exitCode ?? (overrides.success === false ? 1 : 0),
43 };
44}
45
46/**
47 * Create a mock executor for testing

Callers 15

mockExecutorFunction · 0.90
executorFunction · 0.90
failingExecutorFunction · 0.90
executorFunction · 0.90
mockExecutorFunction · 0.90
mockExecutorFunction · 0.90
mockExecutorFunction · 0.90
trackingExecutorFunction · 0.90
mockFunction · 0.90
mockExecutorFunction · 0.90
mockExecutorFunction · 0.90
mockExecutorFunction · 0.90

Calls

no outgoing calls

Tested by 15

mockExecutorFunction · 0.72
executorFunction · 0.72
failingExecutorFunction · 0.72
executorFunction · 0.72
mockExecutorFunction · 0.72
mockExecutorFunction · 0.72
mockExecutorFunction · 0.72
trackingExecutorFunction · 0.72
mockFunction · 0.72
mockExecutorFunction · 0.72
mockExecutorFunction · 0.72
mockExecutorFunction · 0.72