-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathhome-page-project-library.component.spec.ts
More file actions
36 lines (32 loc) · 1.33 KB
/
home-page-project-library.component.spec.ts
File metadata and controls
36 lines (32 loc) · 1.33 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
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { HomePageProjectLibraryComponent } from './home-page-project-library.component';
import { LibraryService } from '../../../services/library.service';
import { MockComponents } from 'ng-mocks';
import { LibraryFiltersComponent } from '../library-filters/library-filters.component';
import { provideRouter } from '@angular/router';
import { OfficialLibraryComponent } from '../official-library/official-library.component';
export class MockLibraryService {
getOfficialLibraryProjects() {}
clearAll() {}
}
describe('HomePageProjectLibraryComponent', () => {
let component: HomePageProjectLibraryComponent;
let fixture: ComponentFixture<HomePageProjectLibraryComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HomePageProjectLibraryComponent,
MockComponents(OfficialLibraryComponent, LibraryFiltersComponent)
],
providers: [{ provide: LibraryService, useClass: MockLibraryService }, provideRouter([])]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomePageProjectLibraryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});