Permalink
Browse files

Added unit test for #5202

  • Loading branch information...
1 parent 4e58391 commit b8b7281ee8f3e489d8eba67ea10dcae7c7cf1031 @IvanSanchez IvanSanchez committed Dec 21, 2016
Showing with 11 additions and 0 deletions.
  1. +11 −0 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();
+ });
});

0 comments on commit b8b7281

Please sign in to comment.