mock-require-lazy
Version:
Simple, intuitive mocking of Node.js modules. Fork of mock-require adding lazy require and is a drop in replacement for mock-require
12 lines (11 loc) • 448 B
text/typescript
export type MockExport = (() => unknown) | unknown;
declare function mock(path: string, mockExport: MockExport, lazy?: boolean): void;
declare namespace mock {
var stop: (path: string) => void;
var stopAll: () => void;
var reRequire: (path: string) => unknown;
}
export default mock;
export declare const stop: (path: string) => void;
export declare const stopAll: () => void;
export declare const reRequire: (path: string) => unknown;