Tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { LostKeyComponent } from './lost-key.component';
|
import { LostKeyComponent } from './lost-key.component';
|
||||||
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
|
|
||||||
describe('LostKeyComponent', () => {
|
describe('LostKeyComponent', () => {
|
||||||
let component: LostKeyComponent;
|
let component: LostKeyComponent;
|
||||||
@@ -8,7 +9,11 @@ describe('LostKeyComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [LostKeyComponent]
|
imports: [LostKeyComponent],
|
||||||
|
providers: [
|
||||||
|
{ provide: MatDialogRef, useValue: [] },
|
||||||
|
{ provide: MAT_DIALOG_DATA, useValue: [] }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { LostKeysComponent } from './lost-keys.component';
|
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', () => {
|
describe('LostKeysComponent', () => {
|
||||||
let component: LostKeysComponent;
|
let component: LostKeysComponent;
|
||||||
@@ -8,7 +11,11 @@ describe('LostKeysComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [LostKeysComponent]
|
imports: [LostKeysComponent],
|
||||||
|
providers: [
|
||||||
|
{ provide: ApiService, useClass: MockApiService },
|
||||||
|
HotToastService
|
||||||
|
]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user