cic-staff-client/src/app/app.component.spec.ts

37 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-10-30 16:16:05 +01:00
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from '@app/app.component';
import {TransactionService} from '@app/_services';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, TransactionServiceStub} from '@src/testing';
2020-10-30 16:16:05 +01:00
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent,
FooterStubComponent,
SidebarStubComponent,
TopbarStubComponent
2020-10-30 16:16:05 +01:00
],
providers: [
{ provide: TransactionService, useClass: TransactionServiceStub }
]
2020-10-30 16:16:05 +01:00
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'cic-staff-client'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('cic-staff-client');
});
});