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(); + }); });