You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a `wrappingComponent` was passed in `options`, this methods returns a `ReactWrapper` around the rendered `wrappingComponent`. This `ReactWrapper` can be used to update the `wrappingComponent`'s props, state, etc.
4
+
5
+
6
+
#### Returns
7
+
8
+
`ReactWrapper`: A `ReactWrapper` around the rendered `wrappingComponent`
If a `wrappingComponent` was passed in `options`, this methods returns a `ShallowWrapper` around the rendered `wrappingComponent`. This `ShallowWrapper` can be used to update the `wrappingComponent`'s props, state, etc.
4
+
5
+
6
+
#### Returns
7
+
8
+
`ShallowWrapper`: A `ShallowWrapper` around the rendered `wrappingComponent`
Copy file name to clipboardexpand all lines: docs/api/mount.md
+5
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ describe('<Foo />', () => {
49
49
-`options.context`: (`Object`[optional]): Context to be passed into the component
50
50
-`options.attachTo`: (`DOMElement`[optional]): DOM Element to attach the component to.
51
51
-`options.childContextTypes`: (`Object`[optional]): Merged contextTypes for all children of the wrapper.
52
+
-`options.wrappingComponent`: (`ComponentType`[optional]): A component that will render as a parent of the `node`. It can be used to provide context to the `node`, among other things. See the [`getWrappingComponent()` docs](ReactWrapper/getWrappingComponent.md) for an example. **Note**: `wrappingComponent`_must_ render its children.
53
+
-`options.wrappingComponentProps`: (`Object`[optional]): Initial props to pass to the `wrappingComponent` if it is specified.
52
54
53
55
#### Returns
54
56
@@ -177,6 +179,9 @@ Manually sets context of the root component.
-`options.disableLifecycleMethods`: (`Boolean`[optional]): If set to true, `componentDidMount`
51
51
is not called on the component, and `componentDidUpdate` is not called after
52
52
[`setProps`](ShallowWrapper/setProps.md) and [`setContext`](ShallowWrapper/setContext.md). Default to `false`.
53
+
-`options.wrappingComponent`: (`ComponentType`[optional]): A component that will render as a parent of the `node`. It can be used to provide context to the `node`, among other things. See the [`getWrappingComponent()` docs](ShallowWrapper/getWrappingComponent.md) for an example. **Note**: `wrappingComponent`_must_ render its children.
54
+
-`options.wrappingComponentProps`: (`Object`[optional]): Initial props to pass to the `wrappingComponent` if it is specified.
53
55
54
56
#### Returns
55
57
@@ -187,6 +189,9 @@ Manually sets props of the root component.
0 commit comments