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

Function call

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

Source from the content-addressed store, hash-verified

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

Calls 1

attemptFunction · 0.70

Tested by

no test coverage detected