import { TestBed, ComponentFixture, async } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { MatSnackBarModule } from '@angular/material/snack-bar'; import { ReactiveFormsModule } from '@angular/forms'; import { GainComponent } from './gain.component'; import { AuthService } from './../../../services/auth.service'; describe('GainComponent', () => { let fixture: ComponentFixture; beforeEach( async(() => { TestBed.configureTestingModule({ imports: [RouterTestingModule, HttpClientTestingModule, MatSnackBarModule, ReactiveFormsModule], declarations: [GainComponent], providers: [AuthService], // Assurez-vous que AuthService est correctement importé }).compileComponents(); }) ); beforeEach(() => { fixture = TestBed.createComponent(GainComponent); }); it('should create', () => { const component = fixture.componentInstance; expect(component).toBeTruthy(); }); });