Adding original properties to cloned geometry

This commit is contained in:
Michał Zielański
2020-08-26 15:11:11 +02:00
parent 62842d5508
commit 8e0a61ac5f
12 changed files with 45 additions and 5 deletions
+3
View File
@@ -9,11 +9,14 @@ describe('ol.geom.Circle', function () {
describe('#clone', function () {
it('returns a clone', function () {
circle.setProperties({foo: 'bar', baz: null});
const clone = circle.clone();
expect(clone).to.be.an(Circle);
expect(clone.getCenter()).to.eql(circle.getCenter());
expect(clone.getCenter()).not.to.be(circle.getCenter());
expect(clone.getRadius()).to.be(circle.getRadius());
expect(clone.getProperties()).to.eql({foo: 'bar', baz: null});
});
});