Skip to content

Commit

Permalink
Fix an argument name of TestUtils.renderIntoDocument (facebook#8104)
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 authored and gaearon committed Oct 26, 2016
1 parent 7bcad0a commit d49dfe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/docs/addons-test-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ ReactTestUtils.Simulate.keyDown(node, {key: "Enter", keyCode: 13, which: 13});
### `renderIntoDocument()`

```javascript
renderIntoDocument(instance)
renderIntoDocument(element)
```

Render a component into a detached DOM node in the document. **This function requires a DOM.**
Render a React element into a detached DOM node in the document. **This function requires a DOM.**

> Note:
>
Expand Down
4 changes: 2 additions & 2 deletions src/test/ReactTestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ function findAllInRenderedTreeInternal(inst, test) {
* @lends ReactTestUtils
*/
var ReactTestUtils = {
renderIntoDocument: function(instance) {
renderIntoDocument: function(element) {
var div = document.createElement('div');
// None of our tests actually require attaching the container to the
// DOM, and doing so creates a mess that we rely on test isolation to
// clean up, so we're going to stop honoring the name of this method
// (and probably rename it eventually) if no problems arise.
// document.documentElement.appendChild(div);
return ReactDOM.render(instance, div);
return ReactDOM.render(element, div);
},

isElement: function(element) {
Expand Down

0 comments on commit d49dfe7

Please sign in to comment.