unwire
Version:
Dependency injection with 'require()'
11 lines (10 loc) • 728 B
TypeScript
import { MockFn } from './types';
declare function mock(modulePath: string, mock: MockFn): any;
declare function replace(modulePath: string, value: any): any;
declare function flush(modulePath: string): boolean;
declare const mockWithContext: (modulePath: string, context: string, mock?: MockFn) => any;
declare const replaceWithContext: (modulePath: string, context: string, value: any) => any;
declare const flushWithContext: (modulePath: string, context: string) => boolean;
declare const flushAllModules: () => void;
declare const resolveModulePath: (modulePath: string, context: string) => string;
export { mock, replace, flush, mockWithContext, replaceWithContext, flushWithContext, flushAllModules, resolveModulePath, };