( future: RouterStateSnapshot, curr: RouterStateSnapshot, injector: EnvironmentInjector, check: (result: GuardResult) => void, )
| 903 | } |
| 904 | |
| 905 | function checkGuards( |
| 906 | future: RouterStateSnapshot, |
| 907 | curr: RouterStateSnapshot, |
| 908 | injector: EnvironmentInjector, |
| 909 | check: (result: GuardResult) => void, |
| 910 | ): void { |
| 911 | // Since we only test the guards, we don't need to provide a full navigation |
| 912 | // transition object with all properties set. |
| 913 | of({ |
| 914 | guards: getAllRouteGuards(future, curr, new ChildrenOutletContexts(injector)), |
| 915 | } as NavigationTransition) |
| 916 | .pipe(checkGuardsOperator()) |
| 917 | .subscribe({ |
| 918 | next(t) { |
| 919 | if (t.guardsResult === null) throw new Error('Guard result expected'); |
| 920 | return check(t.guardsResult); |
| 921 | }, |
| 922 | error(e) { |
| 923 | throw e; |
| 924 | }, |
| 925 | }); |
| 926 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…