(route: Route, fn: () => Observable<unknown>)
| 293 | const mockPreloaderFactory = (): PreloadingStrategy => { |
| 294 | class DelayedPreLoad implements PreloadingStrategy { |
| 295 | preload(route: Route, fn: () => Observable<unknown>): Observable<unknown> { |
| 296 | const routeName = route.loadChildren |
| 297 | ? (route.loadChildren as jasmine.Spy).and.identity |
| 298 | : 'noChildren'; |
| 299 | return delayLoadObserver$.pipe( |
| 300 | filter((unpauseList) => unpauseList.indexOf(routeName) !== -1), |
| 301 | take(1), |
| 302 | switchMap(() => { |
| 303 | return fn().pipe(catchError(() => of(null))); |
| 304 | }), |
| 305 | ); |
| 306 | } |
| 307 | } |
| 308 | return new DelayedPreLoad(); |
| 309 | }; |
nothing calls this directly
no test coverage detected