@@ -2,7 +2,6 @@ import { TestBed, waitForAsync } from '@angular/core/testing';
22import { NavbarComponent } from './shared/navbar/navbar.component' ;
33import { FooterComponent } from './shared/footer/footer.component' ;
44import { AppComponent } from './app.component' ;
5- import { RouterTestingModule } from '@angular/router/testing' ;
65import { environment } from '../environments/environment' ;
76import { provideHttpClientTesting } from '@angular/common/http/testing' ;
87import { GlobalMaterialModules } from './shared/modules/global.module' ;
@@ -13,23 +12,27 @@ import { NewsService } from './shared/news/news.service';
1312import { SearchModule } from './shared/search/search.module' ;
1413import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
1514import { provideHttpClient , withInterceptorsFromDi } from '@angular/common/http' ;
16-
15+ import { FloatingFeedbackComponent } from './shared/floating-feedback/floating-feedback.component' ;
16+ import { provideRouter , RouterOutlet } from '@angular/router' ;
17+ import { provideLocationMocks } from '@angular/common/testing' ;
1718
1819describe ( 'AppComponent' , ( ) => {
1920 beforeEach ( waitForAsync ( ( ) => {
2021 TestBed . configureTestingModule ( {
2122 declarations : [
2223 AppComponent ,
2324 NavbarComponent ,
24- FooterComponent
25+ FooterComponent ,
26+ FloatingFeedbackComponent
2527 ] ,
26- imports : [ RouterTestingModule ,
28+ imports : [
2729 GlobalMaterialModules ,
2830 FormsModule ,
2931 ExtrasModule ,
3032 SearchModule ,
31- NoopAnimationsModule ] ,
32- providers : [ SearchService , NewsService , provideHttpClient ( withInterceptorsFromDi ( ) ) , provideHttpClientTesting ( ) ]
33+ NoopAnimationsModule , RouterOutlet ] ,
34+ providers : [ SearchService , NewsService , provideHttpClient ( withInterceptorsFromDi ( ) ) , provideHttpClientTesting ( ) , provideRouter ( [ ] ) , // Pass your routes here if needed
35+ provideLocationMocks ( ) ]
3336} ) . compileComponents ( ) ;
3437 } ) ) ;
3538
0 commit comments