| @@ -1,31 +0,0 @@ | |||||
| import { TestBed, async } from '@angular/core/testing'; | |||||
| import { AppComponent } from './app.component'; | |||||
| describe('AppComponent', () => { | |||||
| beforeEach(async(() => { | |||||
| TestBed.configureTestingModule({ | |||||
| declarations: [ | |||||
| AppComponent | |||||
| ], | |||||
| }).compileComponents(); | |||||
| })); | |||||
| it('should create the app', () => { | |||||
| const fixture = TestBed.createComponent(AppComponent); | |||||
| const app = fixture.debugElement.componentInstance; | |||||
| expect(app).toBeTruthy(); | |||||
| }); | |||||
| it(`should have as title 'angular-tour-of-heroes'`, () => { | |||||
| const fixture = TestBed.createComponent(AppComponent); | |||||
| const app = fixture.debugElement.componentInstance; | |||||
| expect(app.title).toEqual('angular-tour-of-heroes'); | |||||
| }); | |||||
| it('should render title', () => { | |||||
| const fixture = TestBed.createComponent(AppComponent); | |||||
| fixture.detectChanges(); | |||||
| const compiled = fixture.debugElement.nativeElement; | |||||
| expect(compiled.querySelector('.content span').textContent).toContain('angular-tour-of-heroes app is running!'); | |||||
| }); | |||||
| }); | |||||
| @@ -1,25 +0,0 @@ | |||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
| import { DashboardComponent } from './dashboard.component'; | |||||
| describe('DashboardComponent', () => { | |||||
| let component: DashboardComponent; | |||||
| let fixture: ComponentFixture<DashboardComponent>; | |||||
| beforeEach(async(() => { | |||||
| TestBed.configureTestingModule({ | |||||
| declarations: [ DashboardComponent ] | |||||
| }) | |||||
| .compileComponents(); | |||||
| })); | |||||
| beforeEach(() => { | |||||
| fixture = TestBed.createComponent(DashboardComponent); | |||||
| component = fixture.componentInstance; | |||||
| fixture.detectChanges(); | |||||
| }); | |||||
| it('should create', () => { | |||||
| expect(component).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||
| @@ -1,25 +0,0 @@ | |||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
| import { HeroDetailComponent } from './hero-detail.component'; | |||||
| describe('HeroDetailComponent', () => { | |||||
| let component: HeroDetailComponent; | |||||
| let fixture: ComponentFixture<HeroDetailComponent>; | |||||
| beforeEach(async(() => { | |||||
| TestBed.configureTestingModule({ | |||||
| declarations: [ HeroDetailComponent ] | |||||
| }) | |||||
| .compileComponents(); | |||||
| })); | |||||
| beforeEach(() => { | |||||
| fixture = TestBed.createComponent(HeroDetailComponent); | |||||
| component = fixture.componentInstance; | |||||
| fixture.detectChanges(); | |||||
| }); | |||||
| it('should create', () => { | |||||
| expect(component).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||
| @@ -1,12 +0,0 @@ | |||||
| import { TestBed } from '@angular/core/testing'; | |||||
| import { HeroService } from './hero.service'; | |||||
| describe('HeroService', () => { | |||||
| beforeEach(() => TestBed.configureTestingModule({})); | |||||
| it('should be created', () => { | |||||
| const service: HeroService = TestBed.get(HeroService); | |||||
| expect(service).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||
| @@ -1,25 +0,0 @@ | |||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
| import { HeroesComponent } from './heroes.component'; | |||||
| describe('HeroesComponent', () => { | |||||
| let component: HeroesComponent; | |||||
| let fixture: ComponentFixture<HeroesComponent>; | |||||
| beforeEach(async(() => { | |||||
| TestBed.configureTestingModule({ | |||||
| declarations: [ HeroesComponent ] | |||||
| }) | |||||
| .compileComponents(); | |||||
| })); | |||||
| beforeEach(() => { | |||||
| fixture = TestBed.createComponent(HeroesComponent); | |||||
| component = fixture.componentInstance; | |||||
| fixture.detectChanges(); | |||||
| }); | |||||
| it('should create', () => { | |||||
| expect(component).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||
| @@ -1,12 +0,0 @@ | |||||
| import { TestBed } from '@angular/core/testing'; | |||||
| import { MessageService } from './message.service'; | |||||
| describe('MessageService', () => { | |||||
| beforeEach(() => TestBed.configureTestingModule({})); | |||||
| it('should be created', () => { | |||||
| const service: MessageService = TestBed.get(MessageService); | |||||
| expect(service).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||