@@ -34,10 +34,38 @@ export interface RenderOptions<
34
34
Q extends Queries = typeof queries ,
35
35
Container extends Element | DocumentFragment = HTMLElement
36
36
> {
37
+ /** By default, React Testing Library will create a div and append that div to the document.body and this is
38
+ * where your React component will be rendered. If you provide your own HTMLElement container via this option,
39
+ * it will not be appended to the document.body automatically.
40
+ *
41
+ * For example: If you are unit testing a tablebody element, it cannot be a child of a div. In this case, you can
42
+ * specify a table as the render container.
43
+ *
44
+ * [Container](https://testing-library.com/docs/react-testing-library/api/#container)
45
+ */
37
46
container ?: Container
47
+ /** If the container is specified, then this defaults to that, otherwise this defaults to document.body. This is used as
48
+ * the base element for the queries as well as what is printed when you use debug().
49
+ *
50
+ * [BaseElement](https://testing-library.com/docs/react-testing-library/api/#baseelement)
51
+ */
38
52
baseElement ?: Element
53
+ /** If hydrate is set to true, then it will render with ReactDOM.hydrate. This may be useful if you are using server-side
54
+ * rendering and use ReactDOM.hydrate to mount your components.
55
+ *
56
+ * [Hydrate](https://testing-library.com/docs/react-testing-library/api/#hydrate)
57
+ */
39
58
hydrate ?: boolean
59
+ /** Queries to bind. Overrides the default set from DOM Testing Library unless merged.
60
+ *
61
+ * [Queries](https://testing-library.com/docs/react-testing-library/api/#queries)
62
+ */
40
63
queries ?: Q
64
+ /** Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating
65
+ * reusable custom render functions for common data providers. See setup for examples.
66
+ *
67
+ * [Wrapper](https://testing-library.com/docs/react-testing-library/api/#wrapper)
68
+ */
41
69
wrapper ?: React . ComponentType
42
70
}
43
71
0 commit comments