]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | import { HttpClientTestingModule } from '@angular/common/http/testing'; |
2 | import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
1911f103 TL |
3 | import { RouterTestingModule } from '@angular/router/testing'; |
4 | ||
f67539c2 TL |
5 | import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; |
6 | import { NgxPipeFunctionModule } from 'ngx-pipe-function'; | |
20effc67 | 7 | import { ToastrModule } from 'ngx-toastr'; |
9f95a23c | 8 | |
f67539c2 TL |
9 | import { CdTableSelection } from '~/app/shared/models/cd-table-selection'; |
10 | import { SummaryService } from '~/app/shared/services/summary.service'; | |
11 | import { SharedModule } from '~/app/shared/shared.module'; | |
12 | import { configureTestBed } from '~/testing/unit-test-helper'; | |
1911f103 | 13 | import { ServiceDaemonListComponent } from '../service-daemon-list/service-daemon-list.component'; |
9f95a23c TL |
14 | import { ServiceDetailsComponent } from './service-details.component'; |
15 | ||
16 | describe('ServiceDetailsComponent', () => { | |
17 | let component: ServiceDetailsComponent; | |
18 | let fixture: ComponentFixture<ServiceDetailsComponent>; | |
19 | ||
20 | configureTestBed({ | |
f67539c2 TL |
21 | imports: [ |
22 | HttpClientTestingModule, | |
23 | RouterTestingModule, | |
24 | SharedModule, | |
25 | NgbNavModule, | |
20effc67 TL |
26 | NgxPipeFunctionModule, |
27 | ToastrModule.forRoot() | |
f67539c2 | 28 | ], |
1911f103 | 29 | declarations: [ServiceDetailsComponent, ServiceDaemonListComponent], |
f67539c2 | 30 | providers: [{ provide: SummaryService, useValue: { subscribeOnce: jest.fn() } }] |
9f95a23c TL |
31 | }); |
32 | ||
33 | beforeEach(() => { | |
34 | fixture = TestBed.createComponent(ServiceDetailsComponent); | |
35 | component = fixture.componentInstance; | |
36 | component.selection = new CdTableSelection(); | |
9f95a23c TL |
37 | }); |
38 | ||
39 | it('should create', () => { | |
1911f103 | 40 | fixture.detectChanges(); |
9f95a23c TL |
41 | expect(component).toBeTruthy(); |
42 | }); | |
9f95a23c | 43 | }); |