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

Function rejectingConnector

packages/plugins/mcp/src/sdk/invoke.test.ts:29–38  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

27const acceptAll = () => Effect.succeed(ElicitationResponse.make({ action: "accept" }));
28
29const rejectingConnector = (cause: unknown): McpConnector =>
30 Effect.succeed({
31 // oxlint-disable-next-line executor/no-double-cast -- boundary: minimal fake MCP client implements only the methods invokeMcpTool calls
32 client: {
33 setRequestHandler: () => undefined,
34 // oxlint-disable-next-line executor/no-promise-reject -- boundary: fake MCP client rejects to exercise invocation error wrapping
35 callTool: () => Promise.reject(cause),
36 } as unknown as McpConnection["client"],
37 close: () => Promise.resolve(),
38 });
39
40const reauthorizationProvider: OAuthClientProvider = {
41 get redirectUrl() {

Callers 1

invoke.test.tsFile · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected