MOBILE-3320 tests: Fix silent errors

main
Noel De Martin 2020-11-24 10:35:15 +01:00
parent cff33e0991
commit 58b4e2b811
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import { Observable } from 'rxjs';
import { NavController } from '@ionic/angular'; import { NavController } from '@ionic/angular';
import { AppComponent } from '@/app/app.component'; import { AppComponent } from '@/app/app.component';
import { CoreApp } from '@services/app';
import { CoreEvents } from '@singletons/events'; import { CoreEvents } from '@singletons/events';
import { CoreLangProvider } from '@services/lang'; import { CoreLangProvider } from '@services/lang';
import { Network, Platform, NgZone } from '@singletons'; import { Network, Platform, NgZone } from '@singletons';
@ -29,6 +30,7 @@ describe('AppComponent', () => {
let config: Partial<RenderConfig>; let config: Partial<RenderConfig>;
beforeEach(() => { beforeEach(() => {
mockSingleton(CoreApp, { setStatusBarColor: jest.fn() });
mockSingleton(Network, { onChange: () => new Observable() }); mockSingleton(Network, { onChange: () => new Observable() });
mockSingleton(Platform, { ready: () => Promise.resolve() }); mockSingleton(Platform, { ready: () => Promise.resolve() });
mockSingleton(NgZone, { run: jest.fn() }); mockSingleton(NgZone, { run: jest.fn() });