Handle asynchronous rendering in tests

This commit is contained in:
Tom Payne
2014-02-20 19:44:29 +01:00
parent 316c146613
commit 710d0c1bd8

View File

@@ -6,7 +6,7 @@ describe('ol.interaction.Draw', function() {
var width = 360;
var height = 180;
beforeEach(function() {
beforeEach(function(done) {
target = document.createElement('div');
var style = target.style;
style.position = 'absolute';
@@ -27,6 +27,9 @@ describe('ol.interaction.Draw', function() {
resolution: 1
})
});
map.on('postrender', function() {
done();
});
});
afterEach(function() {