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

Class TestModule

packages/router/test/bootstrap.spec.ts:106–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105 it('should complete when initial navigation fails and initialNavigation = enabledBlocking', async () => {
106 @NgModule({
107 imports: [BrowserModule],
108 declarations: [RootCmp],
109 bootstrap: [RootCmp],
110 providers: [
111 ...testProviders,
112 provideRouter(
113 [
114 {
115 matcher: () => {
116 throw new Error('error in matcher');
117 },
118 children: [],
119 },
120 ],
121 withEnabledBlockingInitialNavigation(),
122 ),
123 ],
124 schemas: [CUSTOM_ELEMENTS_SCHEMA],
125 })
126 class TestModule {
127 constructor(router: Router) {
128 log.push('TestModule');
129 router.events.subscribe((e) => log.push(e.constructor.name));
130 }
131 }
132
133 await platformBrowser([])
134 .bootstrapModule(TestModule)

Callers

nothing calls this directly

Calls 6

NgModuleInterface · 0.90
injectFunction · 0.90
provideRouterFunction · 0.50
forRootMethod · 0.45
createUrlTreeMethod · 0.45

Tested by

no test coverage detected