MCPcopy
hub / github.com/angular/angular / delayObservable

Function delayObservable

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

Source from the content-addressed store, hash-verified

1830
1831 describe('should run CanLoad guards concurrently', () => {
1832 function delayObservable(delayMs: number): Observable<boolean> {
1833 return of(delayMs).pipe(
1834 switchMap((v) => new Promise((r) => setTimeout(r, delayMs)).then(() => v)),
1835 mapTo(true),
1836 );
1837 }
1838
1839 let log: string[];
1840 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…