import { TestBed } from '@angular/core/testing'; import { provideRouter } from '@angular/router'; import { provideHttpClient } from '@angular/common/http'; import { provideAnimations } from '@angular/platform-browser/animations'; import { provideNativeDateAdapter } from '@angular/material/core'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ imports: [AppComponent], providers: [ provideRouter([]), provideHttpClient(), provideAnimations(), provideNativeDateAdapter(), ], }).compileComponents(); }); it('should create the app', () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app).toBeTruthy(); }); it(`should have the 'Ad Astra' title`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app.title).toEqual('Ad Astra'); }); it('should render the full layout', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement as HTMLElement; expect(compiled.querySelector('app-full-layout')).toBeTruthy(); }); });