File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 66 BoundFunction ,
77 prettyFormat ,
88} from '@testing-library/dom'
9+ import React from 'react'
910import { Renderer } from 'react-dom'
1011import { act as reactAct } from 'react-dom/test-utils'
1112
@@ -70,9 +71,7 @@ export interface RenderOptions<
7071 *
7172 * @see https://testing-library.com/docs/react-testing-library/api/#wrapper
7273 */
73- wrapper ?:
74- | React . ComponentType
75- | ( ( props : { children : React . ReactNode } ) => JSX . Element )
74+ wrapper ?: React . ComponentType < { children : React . ReactElement } >
7675}
7776
7877type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > >
Original file line number Diff line number Diff line change @@ -111,6 +111,17 @@ export function wrappedRender(
111111 return pure . render ( ui , { wrapper : Wrapper , ...options } )
112112}
113113
114+ export function wrappedRenderB (
115+ ui : React . ReactElement ,
116+ options ?: pure . RenderOptions ,
117+ ) {
118+ const Wrapper : React . FunctionComponent = ( { children} ) => {
119+ return < div > { children } </ div >
120+ }
121+
122+ return pure . render ( ui , { wrapper : Wrapper , ...options } )
123+ }
124+
114125/*
115126eslint
116127 testing-library/prefer-explicit-assert: "off",
You can’t perform that action at this time.
0 commit comments