import { describe, it, expect } from 'vitest'; import { TestBed } from '@angular/core/testing'; import { provideZonelessChangeDetection } from '@angular/core'; import { App } from './app'; import { appConfig } from './app.config'; import { Router } from '@angular/router'; describe('Route Data and Resolvers', () => { it('renders the initial contract and handles the documented operations', async () => { TestBed.configureTestingModule({ imports: [App], providers: [...(appConfig.providers ?? [])], }); const fixture = TestBed.createComponent(App); const element = fixture.nativeElement as HTMLElement; fixture.detectChanges(); await TestBed.inject(Router).navigateByUrl('/'); await fixture.whenStable(); const text = () => element.querySelector('[data-result]')?.textContent?.trim(); expect(text()).toBe('Hand drill'); fixture.destroy(); }); });