Files
quartz-manager/quartz-manager-frontend/src/app/app.component.spec.ts
2022-12-06 00:39:45 +01:00

52 lines
1.3 KiB
TypeScript

import {TestBed, async, waitForAsync} from '@angular/core/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { MockApiService } from './services/mocks/api.service.mock';
import { FooterComponent} from './components';
import {MatIconRegistry} from '@angular/material/icon';
import {MatToolbarModule} from '@angular/material/toolbar';
import {
ApiService,
AuthService,
UserService,
ConfigService
} from './services';
describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent,
FooterComponent,
],
imports: [
RouterTestingModule,
MatToolbarModule
],
providers: [
MatIconRegistry,
{
provide: ApiService,
useClass: MockApiService
},
AuthService,
UserService,
ConfigService
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
});