File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,19 @@ append that div to the `document.body` and this is where your react component
192
192
will be rendered . If you provide your own HTMLElement ` container ` via this
193
193
option , it will not be appended to the ` document.body ` automatically .
194
194
195
+ For Example :
196
+ If you are unit testing a ` tablebody ` element , it cannot be a child of a ` div ` .
197
+ In this case , you can specify a ` table ` as the render ` container ` .
198
+
199
+ ` ` ` javascript
200
+ const table = document.createElement('table');
201
+
202
+ const { container } = render(
203
+ <TableBody {...props} />,
204
+ { container: document.body.appendChild(table) }
205
+ );
206
+ ` ` `
207
+
195
208
** baseElement ** : If the ` container ` is specified , then this defaults to that ,
196
209
otherwise this defaults to ` document.documentElement ` . This is used as the base
197
210
element for the queries as well as what is printed when you use ` debug() ` .
You can’t perform that action at this time.
0 commit comments