Creating an object that stores properties only when needed in BaseObject class

This commit is contained in:
Michał Zielański
2020-06-15 13:00:26 +02:00
parent 323a472fbb
commit 0e8f0034ab
7 changed files with 103 additions and 58 deletions

View File

@@ -101,6 +101,22 @@ describe('ol.Object', function () {
});
});
describe('hasProperties', function () {
it('has no properties after creation', function () {
expect(o.hasProperties()).to.eql(false);
});
it('has properties after set', function () {
o.set('foo', 1);
expect(o.hasProperties()).to.eql(true);
});
it('has no properties after unset all', function () {
o.unset('foo');
expect(o.hasProperties()).to.eql(false);
});
});
describe('notify', function () {
let listener1, listener2;