mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
tests: Don't add the div to the DOM
This commit is contained in:
parent
429d110212
commit
a512e600a7
1 changed files with 5 additions and 2 deletions
|
@ -53,13 +53,16 @@ describe('joining a room', function () {
|
||||||
httpBackend = new MockHttpBackend();
|
httpBackend = new MockHttpBackend();
|
||||||
jssdk.request(httpBackend.requestFn);
|
jssdk.request(httpBackend.requestFn);
|
||||||
parentDiv = document.createElement('div');
|
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() {
|
afterEach(function() {
|
||||||
if (parentDiv) {
|
if (parentDiv) {
|
||||||
ReactDOM.unmountComponentAtNode(parentDiv);
|
ReactDOM.unmountComponentAtNode(parentDiv);
|
||||||
document.body.removeChild(parentDiv);
|
parentDiv.remove();
|
||||||
parentDiv = null;
|
parentDiv = null;
|
||||||
}
|
}
|
||||||
httpBackend.verifyNoOutstandingRequests();
|
httpBackend.verifyNoOutstandingRequests();
|
||||||
|
|
Loading…
Reference in a new issue