react-klasha
Version:
React hooks and components for accepting payments with the Klasha payment gateway
21 lines (20 loc) • 879 B
TypeScript
import { KlashaOptionsProps } from '../types';
export declare const config: KlashaOptionsProps;
/**
* jsdom never executes or fires load events for injected external scripts, so
* tests drive the lifecycle by hand.
*/
export declare const fireScriptLoad: () => void;
export declare const fireScriptError: () => void;
export interface FakeKlashaClient {
/** The constructor spy — `mock.calls[n]` holds the 9 arguments. */
KlashaClient: jest.Mock;
/** The `init()` spy on the instance the constructor returns. */
init: jest.Mock;
}
/** Installs a fake `window.KlashaClient`. */
export declare const installFakeKlashaClient: () => FakeKlashaClient;
export declare const removeFakeKlashaClient: () => void;
/** Every container div this library owns. */
export declare const klashaContainers: () => HTMLElement[];
export declare const scriptSrcs: () => string[];