Use named exports from ol/index.js
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import _ol_ from '../../../src/ol/index.js';
|
||||
import {getUid} 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));
|
||||
expect(getUid(a)).to.be(getUid(a));
|
||||
});
|
||||
|
||||
it('generates a strictly increasing sequence', function() {
|
||||
var a = {}, b = {}, c = {};
|
||||
_ol_.getUid(a);
|
||||
_ol_.getUid(c);
|
||||
_ol_.getUid(b);
|
||||
getUid(a);
|
||||
getUid(c);
|
||||
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));
|
||||
expect(getUid(a)).to.be.lessThan(getUid(c));
|
||||
expect(getUid(c)).to.be.lessThan(getUid(b));
|
||||
expect(getUid(a)).to.be.lessThan(getUid(b));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user