Handle asynchronous rendering in tests
This commit is contained in:
@@ -6,7 +6,7 @@ describe('ol.interaction.Draw', function() {
|
|||||||
var width = 360;
|
var width = 360;
|
||||||
var height = 180;
|
var height = 180;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function(done) {
|
||||||
target = document.createElement('div');
|
target = document.createElement('div');
|
||||||
var style = target.style;
|
var style = target.style;
|
||||||
style.position = 'absolute';
|
style.position = 'absolute';
|
||||||
@@ -27,6 +27,9 @@ describe('ol.interaction.Draw', function() {
|
|||||||
resolution: 1
|
resolution: 1
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
map.on('postrender', function() {
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user