import type { IntegrationContext } from '@polarityio/integration-types'; /** * Factory function that creates mock functions. Pass `vi.fn` (Vitest) * or `jest.fn` (Jest) to get spy capabilities. When omitted, plain * no-op functions are used. * * @example * ```typescript * // Vitest — enables toHaveBeenCalledWith() assertions * const ctx = createMockIntegrationContext(vi.fn); * * // Jest * const ctx = createMockIntegrationContext(jest.fn); * * // No framework — plain no-ops * const ctx = createMockIntegrationContext(); * ``` * @public */ export type MockFnFactory = () => (...args: any[]) => any; /** * Creates a mock `IntegrationContext` * with 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. * * @param createMockFn - A factory that creates mock functions (e.g., `vi.fn` or `jest.fn`) * @returns A fully populated `IntegrationContext` with stubbed methods * * @group Testing * @public * * @example * ```typescript * // Vitest * const ctx = createMockIntegrationContext(vi.fn); * * // Jest * const ctx = createMockIntegrationContext(jest.fn); * * // No framework — plain no-ops * const ctx = createMockIntegrationContext(); * ``` */ export declare const createMockIntegrationContext: (createMockFn?: MockFnFactory) => IntegrationContext; //# sourceMappingURL=create-mock-integration-context.d.ts.map