projects
/
examples
/
angular-tour-of-heroes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplified tests for HeroService
[examples/angular-tour-of-heroes]
/
src
/
app
/
hero.service.spec.ts
diff --git
a/src/app/hero.service.spec.ts
b/src/app/hero.service.spec.ts
index
7730d9f
..
08364db
100644
(file)
--- a/
src/app/hero.service.spec.ts
+++ b/
src/app/hero.service.spec.ts
@@
-8,17
+8,14
@@
import { Hero } from './hero';
describe('HeroService', () => {
let service: HeroService;
let httpTestingController: HttpTestingController;
describe('HeroService', () => {
let service: HeroService;
let httpTestingController: HttpTestingController;
- let scheduler: TestScheduler;
beforeEach(() => {
TestBed.configureTestingModule({
beforeEach(() => {
TestBed.configureTestingModule({
- imports: [ HttpClientTestingModule ]
+ imports: [ HttpClientTestingModule ],
+ providers: [ HeroService ]
});
service = TestBed.inject(HeroService);
httpTestingController = TestBed.inject(HttpTestingController);
});
service = TestBed.inject(HeroService);
httpTestingController = TestBed.inject(HttpTestingController);
- scheduler = new TestScheduler(((actual, expected) => {
- expect(actual).toEqual(expected);
- }));
});
afterEach(() => {
});
afterEach(() => {