From 710d0c1bd86b8c056c32987aad2f04092da4eb30 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 20 Feb 2014 19:44:29 +0100 Subject: [PATCH] Handle asynchronous rendering in tests --- test/spec/ol/interaction/drawinteraction.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/spec/ol/interaction/drawinteraction.test.js b/test/spec/ol/interaction/drawinteraction.test.js index bdac50dd3f..5a783ef35d 100644 --- a/test/spec/ol/interaction/drawinteraction.test.js +++ b/test/spec/ol/interaction/drawinteraction.test.js @@ -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() {