response-contact.component.spec.ts 1.1 KB

123456789101112131415161718192021222324252627
  1. import { TestBed } from '@angular/core/testing';
  2. import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
  3. import { ReactiveFormsModule } from '@angular/forms';
  4. import { HttpClientTestingModule } from '@angular/common/http/testing';
  5. import { RouterTestingModule } from '@angular/router/testing'; // Importez RouterTestingModule
  6. import { ResponseContactComponent } from './response-contact.component';
  7. describe('ResponseContactComponent', () => {
  8. beforeEach(() => {
  9. TestBed.configureTestingModule({
  10. declarations: [ResponseContactComponent],
  11. imports: [MatDialogModule, ReactiveFormsModule, HttpClientTestingModule, RouterTestingModule], // Ajoutez RouterTestingModule
  12. providers: [
  13. { provide: MatDialogRef, useValue: {} },
  14. { provide: MAT_DIALOG_DATA, useValue: {} }
  15. ],
  16. });
  17. });
  18. it('should create', () => {
  19. const fixture = TestBed.createComponent(ResponseContactComponent);
  20. const component = fixture.componentInstance;
  21. expect(component).toBeTruthy();
  22. });
  23. // Ajoutez plus de cas de test au besoin
  24. });