@samitouri / QOS-React-2 / commits / ce95c3d042

[React] Don't attach to document in ReactTestUtils.renderIntoDocument.

Ben Newman committed Feb 3, 2014 at 11:48 UTC ce95c3d042309d8aced894cc6be43d7e4cf96455
1 file changed +5 -1
src/test/ReactTestUtils.js
+5 -1
@@ -43,7 +43,11 @@ function Event(suffix) {}
43 var ReactTestUtils = {
44 renderIntoDocument: function(instance) {
45 var div = document.createElement('div');
46 - document.documentElement.appendChild(div);
46 + // None of our tests actually require attaching the container to the
47 + // DOM, and doing so creates a mess that we rely on test isolation to
48 + // clean up, so we're going to stop honoring the name of this method
49 + // (and probably rename it eventually) if no problems arise.
50 + // document.documentElement.appendChild(div);
51 return React.renderComponent(instance, div);
52 },
53