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