MCPcopy
hub / github.com/angular/angular / wrapTestFn

Function wrapTestFn

packages/private/testing/src/utils.ts:81–90  ·  view source on GitHub ↗

* Wraps provided function (which typically contains the code of a test) into a new function that * performs the necessary setup of the environment.

(
  elementGetter: () => HTMLElement,
  html: string,
  blockFn: () => Promise<unknown> | void,
)

Source from the content-addressed store, hash-verified

79 * performs the necessary setup of the environment.
80 */
81function wrapTestFn(
82 elementGetter: () => HTMLElement,
83 html: string,
84 blockFn: () => Promise<unknown> | void,
85): jasmine.ImplementationCallback {
86 return () => {
87 elementGetter().innerHTML = html;
88 return blockFn();
89 };
90}
91
92let savedDocument: Document | undefined = undefined;
93let savedRequestAnimationFrame: ((callback: FrameRequestCallback) => number) | undefined =

Callers 2

withBodyFunction · 0.85
withHeadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…