Named exports from ol/Observable
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user