Browse Source

Merge pull request #106 from annuhdo/update-doc-mockComponent

Update site's doc mockComponent()
main
Brian Vaughn 7 years ago
committed by GitHub
parent
commit
877da53e3a
  1. 4
      content/docs/addons-test-utils.md

4
content/docs/addons-test-utils.md

@ -112,6 +112,10 @@ mockComponent(
Pass a mocked component module to this method to augment it with useful methods that allow it to be used as a dummy React component. Instead of rendering as usual, the component will become a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children.
> Note:
>
> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/test-utils.html#shallow-rendering) or [jest.mock()](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead.
* * *
### `isElement()`

Loading…
Cancel
Save