(providers: Provider[] = [])
| 567 | const navigation = window.navigation as Navigation; |
| 568 | |
| 569 | async function setup(providers: Provider[] = []) { |
| 570 | TestBed.configureTestingModule({ |
| 571 | providers: [ |
| 572 | provideRouter( |
| 573 | [ |
| 574 | { |
| 575 | path: 'guarded', |
| 576 | canActivate: [() => inject(Router).parseUrl('/search?q=redirected')], |
| 577 | children: [], |
| 578 | }, |
| 579 | {path: '**', children: []}, |
| 580 | ], |
| 581 | withExperimentalPlatformNavigation(), |
| 582 | ), |
| 583 | {provide: PlatformLocation, useClass: BrowserPlatformLocation}, |
| 584 | {provide: PlatformNavigation, useFactory: () => navigation}, |
| 585 | ...providers, |
| 586 | ], |
| 587 | }); |
| 588 | const router = TestBed.inject(Router); |
| 589 | router.initialNavigation(); |
| 590 | await timeout(); |
| 591 | return router; |
| 592 | } |
| 593 | |
| 594 | it( |
| 595 | 'resets focus by default', |
no test coverage detected