Clean up after rendering tests

This commit is contained in:
Tim Schaub
2017-07-03 15:17:18 -06:00
parent 46bcce464f
commit a2c043d1b4
2 changed files with 24 additions and 8 deletions

View File

@@ -494,4 +494,12 @@ goog.require('ol.renderer.webgl.Map');
};
};
// throw if anybody appends a div to the body and doesn't remove it
afterEach(function() {
var garbage = document.body.getElementsByTagName('div');
if (garbage.length) {
throw new Error('Found extra <div> elements in the body');
}
});
})(this);