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