From: Kai Moritz Date: Sat, 27 Jun 2020 12:44:53 +0000 (+0200) Subject: WIP: 6: Get Data from a Server k) Search by name X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;ds=sidebyside;p=examples%2Fangular-tour-of-heroes WIP: 6: Get Data from a Server k) Search by name --- diff --git a/src/app/hero-search/hero-search.component.spec.ts b/src/app/hero-search/hero-search.component.spec.ts index 901bb7f..335a305 100644 --- a/src/app/hero-search/hero-search.component.spec.ts +++ b/src/app/hero-search/hero-search.component.spec.ts @@ -1,6 +1,9 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { HeroSearchComponent } from './hero-search.component'; +import { HeroService } from '../hero.service'; + +class MockHeroService {} describe('HeroSearchComponent', () => { let component: HeroSearchComponent; @@ -8,7 +11,8 @@ describe('HeroSearchComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ HeroSearchComponent ] + declarations: [ HeroSearchComponent ], + providers: [ { provide: HeroService, useClass: MockHeroService } ] }) .compileComponents(); }));