32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
import { MyProfileProjectListComponent } from './my-profile-project-list.component';
|
|
import { ProjectRepository } from '@app/domain/projects/project.repository';
|
|
import { provideRouter } from '@angular/router';
|
|
import { PROJECT_REPOSITORY_TOKEN } from '@app/infrastructure/projects/project-repository.token';
|
|
import { mockProfileRepo } from '@app/testing/profile.mock';
|
|
|
|
describe('MyProfileProjectListComponent', () => {
|
|
let component: MyProfileProjectListComponent;
|
|
let fixture: ComponentFixture<MyProfileProjectListComponent>;
|
|
let mockProjectRepository: jest.Mocked<Partial<ProjectRepository>> = mockProfileRepo;
|
|
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
imports: [MyProfileProjectListComponent],
|
|
providers: [
|
|
provideRouter([]),
|
|
{ provide: PROJECT_REPOSITORY_TOKEN, useValue: mockProjectRepository },
|
|
],
|
|
}).compileComponents();
|
|
|
|
fixture = TestBed.createComponent(MyProfileProjectListComponent);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|