Browse Source

Merge pull request #3013 from akheron/patch-2

Document React.addons.TestUtils.isElement()
main
Paul O’Shannessy 10 years ago
parent
commit
f1c37c4b0b
  1. 8
      docs/10.4-test-utils.md

8
docs/10.4-test-utils.md

@ -43,6 +43,14 @@ object mockComponent(function componentClass, string? mockTagName)
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.
### isElement
```javascript
boolean isElement(ReactElement element)
```
Returns true if `element` is any ReactElement.
### isElementOfType
```javascript

Loading…
Cancel
Save