cli-testing-library
Version:
Simple and complete CLI testing utilities that encourage good testing practices.
12 lines (11 loc) • 808 B
text/typescript
import { TestInstance } from './types.cjs';
declare function jestFakeTimersAreEnabled(): boolean;
declare function getCurrentInstance(): TestInstance | undefined;
declare function setCurrentInstance(newInstance: TestInstance): void;
declare function debounce<T extends (...args: Array<any>) => void>(func: T, timeout: number): (...args: Parameters<T>) => void;
/**
* This is used to bind a series of functions where `instance` is the first argument
* to an instance, removing the implicit first argument.
*/
declare function bindObjectFnsToInstance(instance: TestInstance, object: Record<string, (...props: Array<unknown>) => unknown>): Record<string, (...props: Array<unknown>) => unknown>;
export { jestFakeTimersAreEnabled, setCurrentInstance, getCurrentInstance, debounce, bindObjectFnsToInstance, };