/** * Jest Console Mocking Operations * * This module provides Jest-specific console mocking capabilities * for testing environments where Jest is available. */ /** * Console method names that can be mocked */ export type ConsoleMethod = 'log' | 'error' | 'warn' | 'info' | 'debug'; /** * Jest-compatible spy interface */ export interface JestSpy { mock: { calls: TArgs[]; }; mockRestore: () => void; mockImplementation: (fn: (...args: any[]) => any) => JestSpy; mockClear: () => void; mockReset: () => void; } /** * Console mock configuration options */ export interface ConsoleMockOptions { /** Whether to capture calls or just silence */ captureCalls?: boolean; /** Whether to silence the original method */ silent?: boolean; /** Custom implementation for the mocked method */ implementation?: (...args: any[]) => any; /** Whether to use Jest if available */ preferJest?: boolean; } /** * Create a Jest-compatible spy if Jest is available * * @param method - Console method to mock * @param silent - Whether to silence the method * @param implementation - Custom implementation * @returns Jest spy or null if Jest unavailable */ export declare function tryCreateJestSpy(method: ConsoleMethod, silent: boolean, implementation?: (...args: any[]) => any): JestSpy | null; /** * Mock a console method using Jest if available * * @param method - Console method to mock * @param options - Mock configuration options * @returns Jest spy or null if Jest unavailable */ export declare function mockConsoleWithJest(method: ConsoleMethod, options?: ConsoleMockOptions): JestSpy | null; //# sourceMappingURL=jestMocker.d.ts.map