import { ComponentFixture, TestBed } from '@angular/core/testing';

import { MyProfileMapComponent } from './my-profile-map.component';
import { PROFILE_REPOSITORY_TOKEN } from '@app/infrastructure/profiles/profile-repository.token';
import { ProfileRepository } from '@app/domain/profiles/profile.repository';
import { mockProfileRepo } from '@app/testing/profile.mock';
import { ToastrService } from 'ngx-toastr';
import { mockToastR } from '@app/testing/toastr.mock';

describe('MyProfileMapComponent', () => {
  let component: MyProfileMapComponent;
  let fixture: ComponentFixture<MyProfileMapComponent>;

  let mockProfileRepository: jest.Mocked<Partial<ProfileRepository>> = mockProfileRepo;
  let mockToastrService: jest.Mocked<Partial<ToastrService>> = mockToastR;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyProfileMapComponent],
      providers: [
        { provide: PROFILE_REPOSITORY_TOKEN, useValue: mockProfileRepository },

        { provide: ToastrService, useValue: mockToastrService },
      ],
    }).compileComponents();

    fixture = TestBed.createComponent(MyProfileMapComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
