mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
tests: Don't add the div to the DOM
This commit is contained in:
parent
322af6513d
commit
181a6a61ff
@ -53,13 +53,16 @@ describe('joining a room', function () {
|
||||
httpBackend = new MockHttpBackend();
|
||||
jssdk.request(httpBackend.requestFn);
|
||||
parentDiv = document.createElement('div');
|
||||
document.body.appendChild(parentDiv);
|
||||
|
||||
// uncomment this to actually add the div to the UI, to help with
|
||||
// debugging (but slow things down)
|
||||
// document.body.appendChild(parentDiv);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
if (parentDiv) {
|
||||
ReactDOM.unmountComponentAtNode(parentDiv);
|
||||
document.body.removeChild(parentDiv);
|
||||
parentDiv.remove();
|
||||
parentDiv = null;
|
||||
}
|
||||
httpBackend.verifyNoOutstandingRequests();
|
||||
|
Loading…
Reference in New Issue
Block a user