Use named exports from ol/index.js

This commit is contained in:
Tim Schaub
2017-12-12 10:24:58 -07:00
parent fce644556b
commit 87295a74dd
250 changed files with 874 additions and 887 deletions

View File

@@ -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));
});
});