MCPcopy Create free account
hub / github.com/angular/angular / setupRouter

Function setupRouter

packages/router/test/create_url_tree.spec.ts:684–699  ·  view source on GitHub ↗
(defaultQueryParamsHandling: QueryParamsHandling)

Source from the content-addressed store, hash-verified

682
683describe('defaultQueryParamsHandling', () => {
684 async function setupRouter(defaultQueryParamsHandling: QueryParamsHandling): Promise<Router> {
685 TestBed.configureTestingModule({
686 providers: [
687 provideRouter(
688 [{path: '**', component: class {}}],
689 withRouterConfig({
690 defaultQueryParamsHandling,
691 }),
692 ),
693 ],
694 });
695
696 const router = TestBed.inject(Router);
697 await router.navigateByUrl('/initial?a=1');
698 return router;
699 }
700
701 it('can use "merge" as the default', async () => {
702 const router = await setupRouter('merge');

Callers 1

Calls 5

provideRouterFunction · 0.90
withRouterConfigFunction · 0.90
injectMethod · 0.65
navigateByUrlMethod · 0.45

Tested by

no test coverage detected