File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11import { async , TestBed } from '@angular/core/testing' ;
2- import { IonicModule } from 'ionic-angular' ;
2+ import { IonicModule , Platform } from 'ionic-angular' ;
33
44import { StatusBar } from '@ionic-native/status-bar' ;
55import { SplashScreen } from '@ionic-native/splash-screen' ;
66
77import { MyApp } from './app.component' ;
8+ import { PlatformMock } from '../../test-config/mocks-ionic' ;
89
910describe ( 'MyApp Component' , ( ) => {
1011 let fixture ;
@@ -18,7 +19,8 @@ describe('MyApp Component', () => {
1819 ] ,
1920 providers : [
2021 StatusBar ,
21- SplashScreen
22+ SplashScreen ,
23+ { provide : Platform , useClass : PlatformMock }
2224 ]
2325 } )
2426 } ) ) ;
Original file line number Diff line number Diff line change 11import { async , ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { By } from '@angular/platform-browser' ;
33import { DebugElement } from '@angular/core' ;
4- import { Page1 } from "./page1" ;
5- import { IonicModule , NavController } from "ionic-angular/index" ;
4+ import { Page1 } from './page1' ;
5+ import { IonicModule , Platform , NavController } from 'ionic-angular/index' ;
6+ import { PlatformMock } from '../../../test-config/mocks-ionic' ;
67
78describe ( 'Page1' , function ( ) {
89 let de : DebugElement ;
@@ -16,7 +17,8 @@ describe('Page1', function () {
1617 IonicModule . forRoot ( Page1 )
1718 ] ,
1819 providers : [
19- NavController
20+ NavController ,
21+ { provide : Platform , useClass : PlatformMock }
2022 ]
2123 } ) ;
2224 } ) ) ;
You can’t perform that action at this time.
0 commit comments