From d49dfe7da424c87b3ebab7ef664cc34ac2b644f5 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Wed, 26 Oct 2016 21:44:46 +0900 Subject: [PATCH] Fix an argument name of TestUtils.renderIntoDocument (#8104) --- docs/docs/addons-test-utils.md | 4 ++-- src/test/ReactTestUtils.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/addons-test-utils.md b/docs/docs/addons-test-utils.md index 18c23371ad74f..83918c60490a8 100644 --- a/docs/docs/addons-test-utils.md +++ b/docs/docs/addons-test-utils.md @@ -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: > diff --git a/src/test/ReactTestUtils.js b/src/test/ReactTestUtils.js index 0dde835e4012d..a5c3b31d23166 100644 --- a/src/test/ReactTestUtils.js +++ b/src/test/ReactTestUtils.js @@ -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) {