Files
openlayers/test/spec/ol/index.test.js
2017-12-12 06:56:19 -07:00

21 lines
579 B
JavaScript

import _ol_ from '../../../src/ol/index.js';
describe('getUid()', function() {
it('is constant once generated', function() {
var a = {};
expect(_ol_.getUid(a)).to.be(_ol_.getUid(a));
});
it('generates a strictly increasing sequence', function() {
var a = {}, b = {}, c = {};
_ol_.getUid(a);
_ol_.getUid(c);
_ol_.getUid(b);
//uid order should be a < c < b
expect(_ol_.getUid(a)).to.be.lessThan(_ol_.getUid(c));
expect(_ol_.getUid(c)).to.be.lessThan(_ol_.getUid(b));
expect(_ol_.getUid(a)).to.be.lessThan(_ol_.getUid(b));
});
});