From b8b7281ee8f3e489d8eba67ea10dcae7c7cf1031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Wed, 21 Dec 2016 14:49:47 +0100 Subject: [PATCH] Added unit test for #5202 --- spec/suites/layer/PopupSpec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/suites/layer/PopupSpec.js b/spec/suites/layer/PopupSpec.js index 28a237ab..15ba044a 100644 --- a/spec/suites/layer/PopupSpec.js +++ b/spec/suites/layer/PopupSpec.js @@ -391,4 +391,15 @@ describe('L.Layer#_popup', function () { expect(marker.isPopupOpen()).to.be(false); }); + it('does not throw is popup is inmediately closed', function (done) { + + map.on('popupopen', function (ev) { + marker.closePopup(); + }); + + expect(function () { + marker.bindPopup("new layer").openPopup(); + done(); + }).to.not.throwException(); + }); });