Handle asynchronous rendering in tests
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user