definma-ui/src/app/home/home.component.spec.ts

37 lines
950 B
TypeScript
Raw Normal View History

2020-05-19 12:49:06 +02:00
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
2020-05-22 09:36:50 +02:00
import {Component} from '@angular/core';
import {By} from '@angular/platform-browser';
@Component({selector: 'app-login', template: ''})
class LoginStubComponent {}
2020-05-19 12:49:06 +02:00
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
2020-05-22 09:36:50 +02:00
declarations: [
HomeComponent,
LoginStubComponent
]
2020-05-19 12:49:06 +02:00
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
2020-05-22 09:36:50 +02:00
it('should load the login component', () => {
expect(fixture.debugElement.query(By.css('app-login'))).toBeTruthy();
});
2020-05-19 12:49:06 +02:00
});