Reinitialize config
This commit is contained in:
parent
0745bfc92e
commit
28ead5ba86
@ -33,7 +33,7 @@ describe('Google Maps map API tests', () => {
|
||||
gmStub.setupGmapsStub();
|
||||
GoogleMapsApi.authError = false;
|
||||
GoogleMapsApi.gmInitialized = false;
|
||||
config.initialize();
|
||||
config.reinitialize();
|
||||
lang.init(config);
|
||||
container = document.createElement('div');
|
||||
mockViewModel = { mapElement: container, model: {} };
|
||||
|
@ -31,7 +31,7 @@ describe('Openlayers map API tests', () => {
|
||||
let mockMap;
|
||||
|
||||
beforeEach(() => {
|
||||
config.initialize();
|
||||
config.reinitialize();
|
||||
document.body.innerHTML = '';
|
||||
container = document.createElement('div');
|
||||
document.body.appendChild(container);
|
||||
|
@ -44,7 +44,7 @@ describe('ConfigViewModel tests', () => {
|
||||
const newUnits = 'imperial';
|
||||
|
||||
beforeEach(() => {
|
||||
config.initialize();
|
||||
config.reinitialize();
|
||||
uObserve.setSilently(config, 'interval', 10);
|
||||
uObserve.setSilently(config, 'lang', 'en');
|
||||
uObserve.setSilently(config, 'units', 'metric');
|
||||
@ -91,7 +91,6 @@ describe('ConfigViewModel tests', () => {
|
||||
|
||||
afterEach(() => {
|
||||
document.body.removeChild(document.querySelector('#fixture'));
|
||||
uObserve.unobserveAll(config);
|
||||
});
|
||||
|
||||
it('should create instance with state as parameter', () => {
|
||||
|
@ -80,7 +80,7 @@ describe('TrackViewModel tests', () => {
|
||||
</div>`;
|
||||
|
||||
document.body.insertAdjacentHTML('afterbegin', fixture);
|
||||
config.initialize();
|
||||
config.reinitialize();
|
||||
config.interval = 10;
|
||||
lang.init(config);
|
||||
trackEl = document.querySelector('#track');
|
||||
|
@ -43,7 +43,7 @@ describe('UserViewModel tests', () => {
|
||||
</div>`;
|
||||
document.body.insertAdjacentHTML('afterbegin', fixture);
|
||||
userEl = document.querySelector('#user');
|
||||
config.initialize();
|
||||
config.reinitialize();
|
||||
lang.init(config);
|
||||
lang.strings['suser'] = 'select user';
|
||||
lang.strings['allusers'] = 'all users';
|
||||
|
Loading…
x
Reference in New Issue
Block a user