-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathinstitutions-users.component.spec.ts
More file actions
53 lines (44 loc) · 1.96 KB
/
Copy pathinstitutions-users.component.spec.ts
File metadata and controls
53 lines (44 loc) · 1.96 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
46
47
48
49
50
51
52
53
import { provideStore } from '@ngxs/store';
import { TranslatePipe } from '@ngx-translate/core';
import { MockComponents, MockPipe, MockProvider } from 'ng-mocks';
import { of } from 'rxjs';
import { provideHttpClient } from '@angular/common/http';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';
import { UserState } from '@core/store/user';
import { AdminTableComponent } from '@osf/features/admin-institutions/components';
import { InstitutionsAdminState } from '@osf/features/admin-institutions/store';
import { ToastService } from '@osf/shared/services';
import { InstitutionsSearchState } from '@osf/shared/stores/institutions-search';
import { LoadingSpinnerComponent, SelectComponent } from '@shared/components';
import { TranslateServiceMock } from '@shared/mocks';
import { InstitutionsUsersComponent } from './institutions-users.component';
describe('InstitutionsUsersComponent', () => {
let component: InstitutionsUsersComponent;
let fixture: ComponentFixture<InstitutionsUsersComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
InstitutionsUsersComponent,
...MockComponents(AdminTableComponent, SelectComponent, LoadingSpinnerComponent),
MockPipe(TranslatePipe),
],
providers: [
MockProvider(ActivatedRoute, { queryParams: of({}) }),
MockProvider(Router),
TranslateServiceMock,
MockProvider(ToastService),
provideStore([InstitutionsAdminState, UserState, InstitutionsSearchState]),
provideHttpClient(),
provideHttpClientTesting(),
],
}).compileComponents();
fixture = TestBed.createComponent(InstitutionsUsersComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});