Named exports from ol/Observable

This commit is contained in:
Frederic Junod
2018-02-21 09:01:08 +01:00
parent e2854b3176
commit 2fd75566fb
6 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
import EventTarget from '../../../src/ol/events/EventTarget.js';
import Observable from '../../../src/ol/Observable.js';
import Observable, {unByKey} from '../../../src/ol/Observable.js';
describe('ol.Observable', function() {
@@ -138,7 +138,7 @@ describe('ol.Observable', function() {
observable.dispatchEvent('foo');
expect(listener.calledOnce).to.be(true);
Observable.unByKey(key);
unByKey(key);
observable.dispatchEvent('foo');
expect(listener.callCount).to.be(1);
});

View File

@@ -1,6 +1,6 @@
import BingMaps from '../../../../src/ol/source/BingMaps.js';
import {quadKey} from '../../../../src/ol/tilecoord.js';
import Observable from '../../../../src/ol/Observable.js';
import {unByKey} from '../../../../src/ol/Observable.js';
describe('ol.source.BingMaps', function() {
@@ -24,7 +24,7 @@ describe('ol.source.BingMaps', function() {
const key = source.on('change', function() {
if (source.getState() === 'ready') {
Observable.unByKey(key);
unByKey(key);
tileGrid = source.getTileGrid();
done();
}

View File

@@ -1,6 +1,6 @@
import Source from '../../../../src/ol/source/Source.js';
import TileJSON from '../../../../src/ol/source/TileJSON.js';
import Observable from '../../../../src/ol/Observable.js';
import {unByKey} from '../../../../src/ol/Observable.js';
describe('ol.source.TileJSON', function() {
@@ -115,7 +115,7 @@ describe('ol.source.TileJSON', function() {
});
const key = source.on('change', function() {
if (source.getState() === 'ready') {
Observable.unByKey(key);
unByKey(key);
tileGrid = source.getTileGrid();
done();
}