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 6
6
BoundFunction ,
7
7
prettyFormat ,
8
8
} from '@testing-library/dom'
9
+ import React from 'react'
9
10
import { Renderer } from 'react-dom'
10
11
import { act as reactAct } from 'react-dom/test-utils'
11
12
@@ -70,9 +71,7 @@ export interface RenderOptions<
70
71
*
71
72
* @see https://testing-library.com/docs/react-testing-library/api/#wrapper
72
73
*/
73
- wrapper ?:
74
- | React . ComponentType
75
- | ( ( props : { children : React . ReactNode } ) => JSX . Element )
74
+ wrapper ?: React . ComponentType < { children : React . ReactElement } >
76
75
}
77
76
78
77
type 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(
111
111
return pure . render ( ui , { wrapper : Wrapper , ...options } )
112
112
}
113
113
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
+
114
125
/*
115
126
eslint
116
127
testing-library/prefer-explicit-assert: "off",
You can’t perform that action at this time.
0 commit comments