Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7b0647

Browse files
committed
Merge pull request facebook#3013 from akheron/patch-2
Document React.addons.TestUtils.isElement()
1 parent 3f367e2 commit f7b0647

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/docs/10.4-test-utils.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ object mockComponent(function componentClass, string? mockTagName)
4343

4444
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.
4545

46+
### isElement
47+
48+
```javascript
49+
boolean isElement(ReactElement element)
50+
```
51+
52+
Returns true if `element` is any ReactElement.
53+
4654
### isElementOfType
4755

4856
```javascript

0 commit comments

Comments
 (0)