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

This commit is contained in:
Ben Newman
2014-02-03 12:51:34 -08:00
committed by Paul O’Shannessy
parent 85270ae154
commit ce95c3d042
+5 -1
View File
@@ -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);
},