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

Function recordStep

test/integration/test-helpers.ts:90–105  ·  view source on GitHub ↗
(step: string, args: string[], result: CliJsonResult)

Source from the content-addressed store, hash-verified

88 }
89
90 function recordStep(step: string, args: string[], result: CliJsonResult): void {
91 const errorCode =
92 typeof result.json?.error?.code === 'string' ? (result.json.error.code as string) : undefined;
93 const errorMessage =
94 typeof result.json?.error?.message === 'string'
95 ? (result.json.error.message as string)
96 : undefined;
97 stepHistory.push({
98 step,
99 command: `agent-device ${args.join(' ')}`,
100 status: result.status,
101 timestamp: new Date().toISOString(),
102 errorCode,
103 errorMessage,
104 });
105 }
106
107 function assertResult(
108 condition: unknown,

Callers 2

runStepFunction · 0.70
runCleanupStepFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected