Skip to content

Commit d49dfe7

Browse files
koba04gaearon
authored andcommitted
Fix an argument name of TestUtils.renderIntoDocument (#8104)
1 parent 7bcad0a commit d49dfe7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/docs/addons-test-utils.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ ReactTestUtils.Simulate.keyDown(node, {key: "Enter", keyCode: 13, which: 13});
122122
### `renderIntoDocument()`
123123

124124
```javascript
125-
renderIntoDocument(instance)
125+
renderIntoDocument(element)
126126
```
127127

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.**
129129

130130
> Note:
131131
>

src/test/ReactTestUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ function findAllInRenderedTreeInternal(inst, test) {
7777
* @lends ReactTestUtils
7878
*/
7979
var ReactTestUtils = {
80-
renderIntoDocument: function(instance) {
80+
renderIntoDocument: function(element) {
8181
var div = document.createElement('div');
8282
// None of our tests actually require attaching the container to the
8383
// DOM, and doing so creates a mess that we rely on test isolation to
8484
// clean up, so we're going to stop honoring the name of this method
8585
// (and probably rename it eventually) if no problems arise.
8686
// document.documentElement.appendChild(div);
87-
return ReactDOM.render(instance, div);
87+
return ReactDOM.render(element, div);
8888
},
8989

9090
isElement: function(element) {

0 commit comments

Comments
 (0)