tests: Don't add the div to the DOM

pull/1386/head
Richard van der Hoff 2016-04-13 11:16:38 +01:00
parent 322af6513d
commit 181a6a61ff
1 changed files with 5 additions and 2 deletions

View File

@ -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();