MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / call

Function call

e2e/cloud/credential-write-durability.test.ts:372–382  ·  view source on GitHub ↗
(label: string)

Source from the content-addressed store, hash-verified

370
371 /** Invoke the tool and require it to have worked end to end. */
372 const call = (label: string): Effect.Effect<ToolEnvelope, unknown> =>
373 Effect.gen(function* () {
374 const result = yield* attempt();
375 expect(
376 result.ok,
377 `the ${label} call reached the upstream and came back (got: ${result.text.slice(0, 400)})`,
378 ).toBe(true);
379 const envelope = JSON.parse(result.text) as ToolEnvelope;
380 expect(envelope.ok, `the ${label} call succeeded`).toBe(true);
381 return envelope;
382 });
383
384 return { attempt, call, oauth, slug, upstream, workos } as const;
385});

Calls 1

attemptFunction · 0.85

Tested by

no test coverage detected