Creates a mock IntegrationContext with stubbed logger, cache, and polling methods.
IntegrationContext
Pass your testing framework's mock function factory to enable spy capabilities (e.g., toHaveBeenCalledWith()). When omitted, plain no-op stubs are used.
toHaveBeenCalledWith()
A factory that creates mock functions (e.g., vi.fn or jest.fn)
vi.fn
jest.fn
A fully populated IntegrationContext with stubbed methods
// Vitestconst ctx = createMockIntegrationContext(vi.fn);// Jestconst ctx = createMockIntegrationContext(jest.fn);// No framework — plain no-opsconst ctx = createMockIntegrationContext(); Copy
// Vitestconst ctx = createMockIntegrationContext(vi.fn);// Jestconst ctx = createMockIntegrationContext(jest.fn);// No framework — plain no-opsconst ctx = createMockIntegrationContext();
Creates a mock
IntegrationContextwith stubbed logger, cache, and polling methods.Pass your testing framework's mock function factory to enable spy capabilities (e.g.,
toHaveBeenCalledWith()). When omitted, plain no-op stubs are used.