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

Function delayObservable

packages/router/test/integration/guards.spec.ts:1892–1897  ·  view source on GitHub ↗
(delayMs: number)

Source from the content-addressed store, hash-verified

1890
1891 describe('should run CanLoad guards concurrently', () => {
1892 function delayObservable(delayMs: number): Observable<boolean> {
1893 return of(delayMs).pipe(
1894 switchMap((v) => new Promise((r) => setTimeout(r, delayMs)).then(() => v)),
1895 mapTo(true),
1896 );
1897 }
1898
1899 let log: string[];
1900 const guard1 = () => {

Callers 3

guard1Function · 0.85
guard2Function · 0.85
returnUrlTreeFunction · 0.85

Calls 2

setTimeoutFunction · 0.85
thenMethod · 0.65

Tested by

no test coverage detected