projects
/
examples
/
angular-tour-of-heroes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2ce800
)
WIP: 6: Get Data from a Server k) Search by name
master
author
Kai Moritz
<kai@juplo.de>
Sat, 27 Jun 2020 12:44:53 +0000
(14:44 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sat, 27 Jun 2020 12:44:53 +0000
(14:44 +0200)
src/app/hero-search/hero-search.component.spec.ts
patch
|
blob
|
history
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
(file)
--- 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 { 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;
describe('HeroSearchComponent', () => {
let component: HeroSearchComponent;
@@
-8,7
+11,8
@@
describe('HeroSearchComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ HeroSearchComponent ]
+ declarations: [ HeroSearchComponent ],
+ providers: [ { provide: HeroService, useClass: MockHeroService } ]
})
.compileComponents();
}));
})
.compileComponents();
}));