50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
import { ToastrModule } from 'ngx-toastr';
|
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
import { ConfigService } from '@services/config.service';
|
|
import { LoadingComponent } from 'src/app/shared/loading/loading.component';
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
import { StatusTabComponent } from './status-tab.component';
|
|
|
|
describe('StatusTabComponent', () => {
|
|
let component: StatusTabComponent;
|
|
let fixture: ComponentFixture<StatusTabComponent>;
|
|
|
|
const mockConfigService = {
|
|
apiUrl: 'http://mock-api-url'
|
|
};
|
|
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
declarations: [StatusTabComponent, LoadingComponent],
|
|
imports: [
|
|
HttpClientTestingModule,
|
|
ToastrModule.forRoot(),
|
|
MatDialogModule,
|
|
MatTabsModule,
|
|
TranslateModule.forRoot(),
|
|
NgxChartsModule,
|
|
BrowserAnimationsModule
|
|
],
|
|
providers: [
|
|
{ provide: ConfigService, useValue: mockConfigService }
|
|
],
|
|
schemas: [NO_ERRORS_SCHEMA]
|
|
})
|
|
.compileComponents();
|
|
|
|
fixture = TestBed.createComponent(StatusTabComponent);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|