Add test to verify that removefeature is triggered

This commit is contained in:
ahocevar
2019-02-04 12:46:51 +01:00
parent 53fc082fc2
commit ce7a1b4365

View File

@@ -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() {