Skip to content

Commit ce95c3d

Browse files
Ben Newmanzpao
authored andcommitted
[React] Don't attach to document in ReactTestUtils.renderIntoDocument.
1 parent 85270ae commit ce95c3d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/test/ReactTestUtils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ function Event(suffix) {}
4343
var ReactTestUtils = {
4444
renderIntoDocument: function(instance) {
4545
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);
4751
return React.renderComponent(instance, div);
4852
},
4953

0 commit comments

Comments
 (0)