MCPcopy Index your code
hub / github.com/angular/angular / mockRequestIdleCallback

Function mockRequestIdleCallback

packages/core/test/acceptance/defer_spec.ts:780–786  ·  view source on GitHub ↗
(
        callback: IdleRequestCallback,
        options?: IdleRequestOptions,
      )

Source from the content-addressed store, hash-verified

778
779 const idleCallbacks: IdleRequestCallback[] = [];
780 const mockRequestIdleCallback = (
781 callback: IdleRequestCallback,
782 options?: IdleRequestOptions,
783 ): number => {
784 idleCallbacks.push(callback);
785 return 1;
786 };
787
788 const nativeRequestIdleCallback = globalThis.requestIdleCallback;
789 const nativeCancelIdleCallback = globalThis.cancelIdleCallback;

Callers

nothing calls this directly

Calls 5

isInAngularZoneMethod · 0.80
withContextMethod · 0.80
setMethod · 0.65
getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…