finished tests
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HomeComponent } from './home.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {By} from '@angular/platform-browser';
|
||||
|
||||
@Component({selector: 'app-login', template: ''})
|
||||
class LoginStubComponent {}
|
||||
|
||||
describe('HomeComponent', () => {
|
||||
let component: HomeComponent;
|
||||
@ -8,7 +12,10 @@ describe('HomeComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HomeComponent ]
|
||||
declarations: [
|
||||
HomeComponent,
|
||||
LoginStubComponent
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
@ -22,4 +29,8 @@ describe('HomeComponent', () => {
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should load the login component', () => {
|
||||
expect(fixture.debugElement.query(By.css('app-login'))).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user