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

Class TestModule

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

Source from the content-addressed store, hash-verified

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