/
results.component.spec.ts
49 lines (45 loc) · 1.64 KB
/
results.component.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { AngularSplitModule } from 'angular-split';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { TestConfig } from 'test.config';
import { ResourceComponent } from '../resource/resource.component';
import { ResultsComponent } from './results.component';
describe('ResultsComponent', () => {
let component: ResultsComponent;
let fixture: ComponentFixture<ResultsComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
ResultsComponent,
ResourceComponent
],
imports: [
AngularSplitModule,
RouterTestingModule
],
providers: [
AppInitService,
{
provide: DspApiConfigToken,
useValue: TestConfig.ApiConfig
},
{
provide: DspApiConnectionToken,
useValue: new KnoraApiConnection(TestConfig.ApiConfig)
}
]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ResultsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});