Fix uLayers array in failing test
This commit is contained in:
parent
9639201702
commit
652655a90f
@ -21,6 +21,7 @@ import * as ol from '../src/lib/ol.js';
|
|||||||
import OpenlayersApi from '../src/mapapi/api_openlayers.js';
|
import OpenlayersApi from '../src/mapapi/api_openlayers.js';
|
||||||
import TrackFactory from './helpers/trackfactory.js';
|
import TrackFactory from './helpers/trackfactory.js';
|
||||||
import { config } from '../src/initializer.js'
|
import { config } from '../src/initializer.js'
|
||||||
|
import uLayer from '../src/layer.js';
|
||||||
import uUtils from '../src/utils.js';
|
import uUtils from '../src/utils.js';
|
||||||
|
|
||||||
describe('Openlayers map API tests', () => {
|
describe('Openlayers map API tests', () => {
|
||||||
@ -76,10 +77,11 @@ describe('Openlayers map API tests', () => {
|
|||||||
it('should initialize map layers with config values', () => {
|
it('should initialize map layers with config values', () => {
|
||||||
// given
|
// given
|
||||||
spyOn(api, 'initLayerSwitcher');
|
spyOn(api, 'initLayerSwitcher');
|
||||||
config.olLayers = {
|
config.olLayers = [
|
||||||
'layer1': 'http://layer1',
|
new uLayer(1, 'layer1', 'http://layer1', 0),
|
||||||
'layer2': 'http://layer2'
|
new uLayer(1, 'layer2', 'http://layer2', 0)
|
||||||
};
|
];
|
||||||
|
|
||||||
api.map = mockMap;
|
api.map = mockMap;
|
||||||
// when
|
// when
|
||||||
api.initLayers();
|
api.initLayers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user