mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[React] Don't attach to document in ReactTestUtils.renderIntoDocument.
This commit is contained in:
committed by
Paul O’Shannessy
parent
85270ae154
commit
ce95c3d042
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user