Named export for ol/featureloader

This commit is contained in:
Frederic Junod
2017-12-17 17:52:32 +01:00
parent a7b743da07
commit 7202573f82
4 changed files with 13 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
import _ol_featureloader_ from '../../../src/ol/featureloader.js';
import {xhr} from '../../../src/ol/featureloader.js';
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
import _ol_source_Vector_ from '../../../src/ol/source/Vector.js';
@@ -19,7 +19,7 @@ describe('ol.featureloader', function() {
});
it('adds features to the source', function(done) {
loader = _ol_featureloader_.xhr(url, format);
loader = xhr(url, format);
source.on('addfeature', function(e) {
expect(source.getFeatures().length).to.be.greaterThan(0);
done();
@@ -32,7 +32,7 @@ describe('ol.featureloader', function() {
url = function(extent, resolution, projection) {
return 'spec/ol/data/point.json';
};
loader = _ol_featureloader_.xhr(url, format);
loader = xhr(url, format);
source.on('addfeature', function(e) {
expect(source.getFeatures().length).to.be.greaterThan(0);
@@ -52,7 +52,7 @@ describe('ol.featureloader', function() {
done();
return 'spec/ol/data/point.json';
};
loader = _ol_featureloader_.xhr(url, format);
loader = xhr(url, format);
loader.call(source, [], 1, 'EPSG:3857');
});
});