import { Broadcaster } from '@ionic-native/broadcaster' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export class BroadcasteMock extends Broadcaster { param eventName { string } return { Observable < any > } addEventListener ( eventName ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; param eventName { string } param eventData { any } return { Promise < any > } fireNativeEvent ( eventName , eventData ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }