import { TestBed } from '@angular/core/testing'; import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { ReactiveFormsModule } from '@angular/forms'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; // Importez RouterTestingModule import { ResponseContactComponent } from './response-contact.component'; describe('ResponseContactComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ declarations: [ResponseContactComponent], imports: [MatDialogModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule], // Ajoutez RouterTestingModule providers: [ { provide: MatDialogRef, useValue: {} }, { provide: MAT_DIALOG_DATA, useValue: {} } ], }); }); it('should create', () => { const fixture = TestBed.createComponent(ResponseContactComponent); const component = fixture.componentInstance; expect(component).toBeTruthy(); }); // Ajoutez plus de cas de test au besoin });