File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export async function renderHook<Result, Props>(
3737) : Promise < RenderHookResult < Result , Props > > {
3838 const result = React . createRef < Result > ( ) as RefObject < Result > ;
3939
40- function TestComponent ( { hookProps } : { hookProps : Props } ) {
40+ function HookContainer ( { hookProps } : { hookProps : Props } ) {
4141 const renderResult = hookToRender ( hookProps ) ;
4242 React . useEffect ( ( ) => {
4343 result . current = renderResult ;
@@ -49,13 +49,13 @@ export async function renderHook<Result, Props>(
4949 const { initialProps, ...renderOptions } = options ?? { } ;
5050 const { rerenderAsync : rerenderComponentAsync , unmountAsync } = await renderAsync (
5151 // @ts -expect-error since option can be undefined, initialProps can be undefined when it should'nt
52- < TestComponent hookProps = { initialProps } /> ,
52+ < HookContainer hookProps = { initialProps } /> ,
5353 renderOptions ,
5454 ) ;
5555
5656 return {
5757 result : result ,
58- rerender : ( hookProps : Props ) => rerenderComponentAsync ( < TestComponent hookProps = { hookProps } /> ) ,
58+ rerender : ( hookProps : Props ) => rerenderComponentAsync ( < HookContainer hookProps = { hookProps } /> ) ,
5959 unmount : unmountAsync ,
6060 } ;
6161}
You can’t perform that action at this time.
0 commit comments