From ce95c3d042309d8aced894cc6be43d7e4cf96455 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Mon, 3 Feb 2014 11:48:34 -0800 Subject: [PATCH] [React] Don't attach to document in ReactTestUtils.renderIntoDocument. --- src/test/ReactTestUtils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/ReactTestUtils.js b/src/test/ReactTestUtils.js index ceec6ac672..16c0c1c42c 100644 --- a/src/test/ReactTestUtils.js +++ b/src/test/ReactTestUtils.js @@ -43,7 +43,11 @@ function Event(suffix) {} var ReactTestUtils = { renderIntoDocument: function(instance) { var div = document.createElement('div'); - document.documentElement.appendChild(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 React.renderComponent(instance, div); },