forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomcol-search-section.component.spec.ts
More file actions
45 lines (38 loc) · 1.41 KB
/
comcol-search-section.component.spec.ts
File metadata and controls
45 lines (38 loc) · 1.41 KB
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
import {
ComponentFixture,
TestBed,
} from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { APP_CONFIG } from '../../../../../config/app-config.interface';
import { environment } from '../../../../../environments/environment.test';
import { ThemedSearchComponent } from '../../../search/themed-search.component';
import { ActivatedRouteStub } from '../../../testing/active-router.stub';
import { ComcolSearchSectionComponent } from './comcol-search-section.component';
describe('ComcolSearchSectionComponent', () => {
let component: ComcolSearchSectionComponent;
let fixture: ComponentFixture<ComcolSearchSectionComponent>;
let route: ActivatedRouteStub;
beforeEach(async () => {
route = new ActivatedRouteStub();
route.parent = new ActivatedRouteStub();
await TestBed.configureTestingModule({
imports: [ComcolSearchSectionComponent],
providers: [
{ provide: APP_CONFIG, useValue: environment },
{ provide: ActivatedRoute, useValue: route },
],
})
.overrideComponent(ComcolSearchSectionComponent, {
remove: {
imports: [ThemedSearchComponent],
},
})
.compileComponents();
fixture = TestBed.createComponent(ComcolSearchSectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});