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

Function assertCommandData

test/integration/smoke-web-platform.test.ts:195–207  ·  view source on GitHub ↗
(
  context: WebSmokeContext,
  step: string,
  args: string[],
  expected: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

193}
194
195async function assertCommandData(
196 context: WebSmokeContext,
197 step: string,
198 args: string[],
199 expected: Record<string, unknown>,
200): Promise<void> {
201 const fullArgs = [...args, ...context.common];
202 const result = await runStep(context, step, fullArgs);
203 for (const [key, value] of Object.entries(expected)) {
204 if (result.json?.data?.[key] === value) continue;
205 failWithContext(context, step, fullArgs, result, `${key} !== ${JSON.stringify(value)}`);
206 }
207}
208
209async function runStep(
210 context: WebSmokeContext,

Callers 2

assertReadAndVisibilityFunction · 0.85
assertWebScreenshotFunction · 0.85

Calls 2

runStepFunction · 0.70
failWithContextFunction · 0.70

Tested by

no test coverage detected