UNPKG

1.26 kBTypeScriptView Raw
1// Type definitions for mockery 1.4.0
2// Project: https://github.com/mfncooper/mockery
3// Definitions by: jt000 <https://github.com/jt000>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6
7
8interface MockeryEnableArgs {
9 useCleanCache?: boolean | undefined;
10 warnOnReplace?: boolean | undefined;
11 warnOnUnregistered?: boolean | undefined;
12}
13
14export declare function enable(args?: MockeryEnableArgs): void;
15export declare function disable(): void;
16
17export declare function registerMock(name: string, mock: any): void;
18export declare function deregisterMock(name: string): void;
19
20export declare function registerSubstitute(name: string, substitute: string): void;
21export declare function deregisterSubstitute(name: string): void;
22
23export declare function registerAllowable(name: string, unhook?: boolean): void;
24export declare function deregisterAllowable(name: string): void;
25
26export declare function registerAllowables(names: string[]): void;
27export declare function deregisterAllowables(names: string[]): void;
28
29export declare function deregisterAll(): void;
30export declare function resetCache(): void;
31export declare function warnOnUnregistered(value: boolean): void;
32export declare function warnOnReplace(value: boolean): void;