src/app/tests/mocks/confirm.ts
Mock for ConfirmService.
Create a mocked service: const confirmService = new MockConfirmService(); TestBed.configureTestingModule({ providers: [ { provide: ConfirmService, useValue: confirmService } ] }).compileComponents();
Methods |
open |
open(title: string, description: string, options: any)
|
Defined in src/app/tests/mocks/confirm.ts:18
|
Returns :
Observable<any>
|
import { Observable, of } from 'rxjs';
/**
* Mock for {@link ConfirmService}.
*
* Create a mocked service:
* const confirmService = new MockConfirmService();
* TestBed.configureTestingModule({
* providers: [
* { provide: ConfirmService, useValue: confirmService }
* ]
* }).compileComponents();
*
* @author Damien Vitrac
*/
export class MockConfirmService {
open(title: string, description: string, options: any = {}): Observable<any> {
return of({});
}
}