Skip to content

Commit

Permalink
Merge pull request #106 from annuhdo/update-doc-mockComponent
Browse files Browse the repository at this point in the history
Update site's doc mockComponent()
  • Loading branch information
bvaughn authored Oct 10, 2017
2 parents 7060923 + b6e2f24 commit 877da53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/docs/addons-test-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand Down

0 comments on commit 877da53

Please sign in to comment.