MCPcopy Create free account
hub / github.com/bytebase/dbhub / createMockManager

Function createMockManager

src/utils/__tests__/config-watcher.test.ts:19–26  ·  view source on GitHub ↗
(overrides: Partial<Record<string, any>> = {})

Source from the content-addressed store, hash-verified

17import { initializeToolRegistry } from "../../tools/registry.js";
18
19function createMockManager(overrides: Partial<Record<string, any>> = {}) {
20 return {
21 disconnect: vi.fn().mockResolvedValue(undefined),
22 connectWithSources: vi.fn().mockResolvedValue(undefined),
23 getAllSourceConfigs: vi.fn().mockReturnValue([]),
24 ...overrides,
25 } as unknown as ConnectorManager;
26}
27
28function createOptions(connectorManager: ConnectorManager, initialTools?: any[]) {
29 return { connectorManager, initialTools };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected