import React , { ReactElement } from 'react' ; import { render , RenderOptions , RenderResult } from '@testing-library/react' ; import TestingPicasso from './TestingPicasso' ; export type PicassoConfig = { titleCase : boolean ; } ; const customRender = ( ui , options ? , picassoConfig ? ) : RenderResult => { const { rerender , ... rest } = render ( < TestingPicasso titleCase = { picassoConfig ?. titleCase } > { ui } < /TestingPicasso>, options); const customRerender = newUi => rerender ( < TestingPicasso titleCase = { picassoConfig ?. titleCase } > { newUi } < /TestingPicasso>); return { rerender : customRerender , ... rest } ; } ; export * from '@testing-library/react' ; export { customRender as render , TestingPicasso } ;