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

Function delayObservable

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

Source from the content-addressed store, hash-verified

1887
1888 describe('should run CanLoad guards concurrently', () => {
1889 function delayObservable(delayMs: number): Observable<boolean> {
1890 return of(delayMs).pipe(
1891 switchMap((v) => new Promise((r) => setTimeout(r, delayMs)).then(() => v)),
1892 mapTo(true),
1893 );
1894 }
1895
1896 let log: string[];
1897 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