ahanaService is service, tenantList is component variable and getTenantLists is service method
it('should have as all tenant list', fakeAsync(() => {
const fixture = TestBed.createComponent(AppComponent);
const comp = fixture.debugElement.componentInstance;
spyOn(comp['ahanaService'], 'getTenantLists').and.callThrough();
comp.ngOnInit();
tick();
expect(comp['tenantList']).not.toBe(null);
}));
Aucun commentaire:
Enregistrer un commentaire