| 2027 | |
| 2028 | describe('canMatch', () => { |
| 2029 | @Injectable({providedIn: 'root'}) |
| 2030 | class ConfigurableGuard { |
| 2031 | result: Promise<boolean | UrlTree> | Observable<boolean | UrlTree> | boolean | UrlTree = |
| 2032 | false; |
| 2033 | canMatch() { |
| 2034 | return this.result; |
| 2035 | } |
| 2036 | } |
| 2037 | |
| 2038 | it('falls back to second route when canMatch returns false', async () => { |
| 2039 | const router = TestBed.inject(Router); |
nothing calls this directly
no test coverage detected