import { AuthService } from '@ngx-auth/core' ; import { Observable , of as observableOf } from 'rxjs' ; export class MockAuthService extends AuthService { isFailing : boolean ; constructor ( ) { const loader = { storage : localStorage } as any ; super ( loader , undefined , undefined ) ; } authenticate ( username , password ) { return observableOf ( ! this . isFailing ) ; } invalidate ( ) { return observableOf ( true ) ; } }