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

Function maybeCaptureSnapshot

test/integration/smoke-web-platform.test.ts:264–272  ·  view source on GitHub ↗
(
  context: WebSmokeContext,
  args: string[],
  result: CliJsonResult,
)

Source from the content-addressed store, hash-verified

262}
263
264function maybeCaptureSnapshot(
265 context: WebSmokeContext,
266 args: string[],
267 result: CliJsonResult,
268): void {
269 if (args[0] !== 'snapshot' || result.status !== 0) return;
270 if (!Array.isArray(result.json?.data?.nodes)) return;
271 context.lastSnapshot = result.json;
272}
273
274function failWithContext(
275 context: WebSmokeContext,

Callers 1

runStepFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected