MCPcopy
hub / github.com/angular/angular / withBody

Function withBody

packages/private/testing/src/utils.ts:38–43  ·  view source on GitHub ↗
(
  html: string,
  blockFn: () => Promise<unknown> | void,
)

Source from the content-addressed store, hash-verified

36 * @param blockFn function to wrap. The function can return promise or be `async`.
37 */
38export function withBody(
39 html: string,
40 blockFn: () => Promise<unknown> | void,
41): jasmine.ImplementationCallback {
42 return wrapTestFn(() => document.body, html, blockFn);
43}
44
45/**
46 * Wraps a function in a new function which sets up document and HTML for running a test.

Calls 1

wrapTestFnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…