import { RenderOptions } from '@testing-library/react'; import { TestkitOutputRegular, TestkitOutputUni } from '@wix/wix-ui-test-utils/dist/types/testing-library'; import { BaseUniDriver } from '@wix/wix-ui-test-utils/dist/types/base-driver'; import { BaseDriver } from '@wix/wix-ui-test-utils'; type CreateRendererOptions = Partial<{ dataHook: string; } & RenderOptions>; /** * Creates a `render` function that returns the same object as `@testing-library/react`'s render, but * with and extra `driver` property. Designed for usage with legacy drivers. Deprecated. * * The returned render function arguments: * @param [React.Element] jsx a jsx element to render * @param [object] options - render-options for @testing-library/react. The options may also contain a `dataHook` prop which if provided then the driver would be created with the element which is found by the dataHook. If not provided then it assumes that the rendered root element is the component's root element and it will be used for the driver. */ export declare function createRendererWithDriver(driverFactory: TestkitOutputRegular, defaultOptions?: CreateRendererOptions): (jsx: JSX.Element, options?: Partial<{ dataHook: string; } & RenderOptions>) => { driver: Driver; container: HTMLElement; baseElement: HTMLElement; debug: (baseElement?: import("react-dom/client").Container | (Element | Document) | Array, maxLength?: number, options?: import("pretty-format").OptionsReceived) => void; rerender: (ui: React.ReactNode) => void; unmount: () => void; asFragment: () => DocumentFragment; }; /** * Creates a `render` function that returns the same object as `@testing-library/react`'s render, but * with and extra `driver` property which is a Unidriver. * * The returned render function arguments: * @param [React.Element] jsx a jsx element to render * @param [object] options - render-options for @testing-library/react. The options may also contain a `dataHook` prop which if provided then the driver would be created with the element which is found by the dataHook. If not provided then it assumes that the rendered root element is the component's root element and it will be used for the driver. */ export declare function createRendererWithUniDriver(driverFactory: TestkitOutputUni, defaultOptions?: CreateRendererOptions): (jsx: JSX.Element, options?: Partial<{ dataHook: string; } & RenderOptions>) => { driver: Driver; container: HTMLElement; baseElement: HTMLElement; debug: (baseElement?: import("react-dom/client").Container | (Element | Document) | Array, maxLength?: number, options?: import("pretty-format").OptionsReceived) => void; rerender: (ui: React.ReactNode) => void; unmount: () => void; asFragment: () => DocumentFragment; }; /** * Creates a `render` function that returns Promise of the same object as `@testing-library/react`'s render, but * with and extra `driver` property which is a Unidriver. Internally wraps 'render' with async 'act', to settle the async state updates after component renders. * * The returned render function arguments: * @param [React.Element] jsx a jsx element to render * @param [object] options - render-options for @testing-library/react. The options may also contain a `dataHook` prop which if provided then the driver would be created with the element which is found by the dataHook. If not provided then it assumes that the rendered root element is the component's root element and it will be used for the driver. */ export declare function createAsyncRendererWithUniDriver(driverFactory: TestkitOutputUni, defaultOptions?: CreateRendererOptions): (jsx: JSX.Element, options?: Partial<{ dataHook: string; } & RenderOptions>) => Promise<{ rerender: (jsxElement: JSX.Element) => Promise; driver: Driver; container: HTMLElement; baseElement: HTMLElement; debug: (baseElement?: import("react-dom/client").Container | (Element | Document) | Array, maxLength?: number, options?: import("pretty-format").OptionsReceived) => void; unmount: () => void; asFragment: () => DocumentFragment; }>; export * from '@testing-library/react'; export * from './runAbsolutelyAllTimers'; //# sourceMappingURL=index.d.ts.map