This commit is contained in:
Bastian Wagner
2025-01-20 13:36:51 +01:00
parent a4084a2d00
commit adca81444e
2 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LostKeyComponent } from './lost-key.component';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
describe('LostKeyComponent', () => {
let component: LostKeyComponent;
@@ -8,7 +9,11 @@ describe('LostKeyComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LostKeyComponent]
imports: [LostKeyComponent],
providers: [
{ provide: MatDialogRef, useValue: [] },
{ provide: MAT_DIALOG_DATA, useValue: [] }
]
})
.compileComponents();

View File

@@ -1,6 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LostKeysComponent } from './lost-keys.component';
import { ApiService } from '../../../../shared/api.service';
import { MockApiService } from '../../../../../../mocks/services/mock.api.service';
import { HotToastService } from '@ngxpert/hot-toast';
describe('LostKeysComponent', () => {
let component: LostKeysComponent;
@@ -8,7 +11,11 @@ describe('LostKeysComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LostKeysComponent]
imports: [LostKeysComponent],
providers: [
{ provide: ApiService, useClass: MockApiService },
HotToastService
]
})
.compileComponents();