MCPcopy
hub / github.com/coder/mux / testInstance

Function testInstance

src/node/services/mcpServerManager.test.ts:51–67  ·  view source on GitHub ↗
(
  name: string,
  options: {
    tools?: Record<string, Tool>;
    close?: ReturnType<typeof mock>;
    isClosed?: boolean;
  } = {}
)

Source from the content-addressed store, hash-verified

49}
50
51function testInstance(
52 name: string,
53 options: {
54 tools?: Record<string, Tool>;
55 close?: ReturnType<typeof mock>;
56 isClosed?: boolean;
57 } = {}
58) {
59 return {
60 name,
61 resolvedTransport: "stdio" as const,
62 autoFallbackUsed: false,
63 tools: options.tools ?? {},
64 isClosed: options.isClosed ?? false,
65 close: options.close ?? mock(() => Promise.resolve(undefined)),
66 };
67}
68
69function startResult(
70 entries: Array<[string, Parameters<typeof testInstance>[1]?]>,

Callers 2

startResultFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected