@sheerid/jslib-nightly
Version:
SheerID JavaScript Library
33 lines (32 loc) • 1.23 kB
TypeScript
import { ReactElement } from 'react';
import { RenderResult } from '@testing-library/react';
import { PreloadedState } from 'redux';
import { ReduxState, VerificationService } from '../../src/lib/types/types';
import { DeepPartial } from '../../src/lib/types/helpers';
/**
* A utility type for testing passing test data to the redux store.
*/
export type PartialRootState = DeepPartial<PreloadedState<VerificationService>>;
export declare const createTestStore: (storeProto?: PartialRootState) => import('redux').Store<ReduxState, import('../../src/es6').VerificationServiceAction>;
type RenderOptions = {
preloadedState?: PartialRootState;
locale?: string;
messages?: Record<string, string>;
};
export declare const buildRenderOptions: (verificationService: VerificationService) => Promise<RenderOptions>;
export declare const render: (ui: ReactElement, options?: RenderOptions) => RenderResult;
declare class S {
result: any;
messages: {};
render(component: any): any;
getRenderOutput(): any;
}
export declare const ShallowCompat: {
createRenderer: () => S;
};
export declare const toEventObject: (value: string | number) => {
target: {
value: string | number;
};
};
export {};