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

Function delayObservable

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

Source from the content-addressed store, hash-verified

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