MCPcopy
hub / github.com/callstack/agent-device / runCliCaptureWithErrorDetails

Function runCliCaptureWithErrorDetails

src/__tests__/cli-close.test.ts:15–23  ·  view source on GitHub ↗
(
  argv: string[],
  details: Record<string, unknown>,
  message = 'Failed to start daemon',
)

Source from the content-addressed store, hash-verified

13}
14
15async function runCliCaptureWithErrorDetails(
16 argv: string[],
17 details: Record<string, unknown>,
18 message = 'Failed to start daemon',
19): Promise<CapturedCliRun> {
20 return runCliCapture(argv, async () => {
21 throw new AppError('COMMAND_FAILED', message, details);
22 });
23}
24
25test('close treats daemon startup failure as no-op', async () => {
26 const result = await runCliWithDaemonStartupFailure(['close']);

Callers 1

cli-close.test.tsFile · 0.85

Calls 1

runCliCaptureFunction · 0.90

Tested by

no test coverage detected