Fix an argument name of TestUtils.renderIntoDocument (#8104)
Toru Kobayashi committed
Oct 26, 2016 at 21:44 UTC
d49dfe7da424c87b3ebab7ef664cc34ac2b644f5
2 files changed
+4
-4
docs/docs/addons-test-utils.md
+2
-2
@@ -122,10 +122,10 @@ ReactTestUtils.Simulate.keyDown(node, {key: "Enter", keyCode: 13, which: 13});
122
### `renderIntoDocument()`
123
124
```javascript
125
-renderIntoDocument(instance)
125
+renderIntoDocument(element)
126
```
127
128
-Render a component into a detached DOM node in the document. **This function requires a DOM.**
128
+Render a React element into a detached DOM node in the document. **This function requires a DOM.**
129
130
> Note:
131
>
src/test/ReactTestUtils.js
+2
-2
@@ -77,14 +77,14 @@ function findAllInRenderedTreeInternal(inst, test) {
77
* @lends ReactTestUtils
78
*/
79
var ReactTestUtils = {
80
- renderIntoDocument: function(instance) {
80
+ renderIntoDocument: function(element) {
81
var div = document.createElement('div');
82
// None of our tests actually require attaching the container to the
83
// DOM, and doing so creates a mess that we rely on test isolation to
84
// clean up, so we're going to stop honoring the name of this method
85
// (and probably rename it eventually) if no problems arise.
86
// document.documentElement.appendChild(div);
87
- return ReactDOM.render(instance, div);
87
+ return ReactDOM.render(element, div);
88
},
89
90
isElement: function(element) {