From ce7a1b43654a1e69a9a401bf0307c5aff195647d Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 4 Feb 2019 12:46:51 +0100 Subject: [PATCH] Add test to verify that removefeature is triggered --- test/spec/ol/source/vector.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/spec/ol/source/vector.test.js b/test/spec/ol/source/vector.test.js index 68a0866810..4addb60f42 100644 --- a/test/spec/ol/source/vector.test.js +++ b/test/spec/ol/source/vector.test.js @@ -259,6 +259,13 @@ describe('ol.source.Vector', function() { expect(listener).to.be.called(); }); + it('fires a removefeature event', function() { + const listener = sinon.spy(); + listen(vectorSource, 'removefeature', listener); + vectorSource.removeFeature(features[0]); + expect(listener).to.be.called(); + }); + }); describe('modifying a feature\'s geometry', function() {