MCPcopy
hub / github.com/angular/angular / wrapDescribeInZone

Function wrapDescribeInZone

packages/zone.js/lib/jasmine/jasmine.ts:173–180  ·  view source on GitHub ↗

* Gets a function wrapping the body of a Jasmine `describe` block to execute in a * synchronous-only zone.

(description: string, describeBody: Function)

Source from the content-addressed store, hash-verified

171 * synchronous-only zone.
172 */
173 function wrapDescribeInZone(description: string, describeBody: Function): Function {
174 return function (this: unknown) {
175 // Create a synchronous-only zone in which to run `describe` blocks in order to raise an
176 // error if any asynchronous operations are attempted inside of a `describe`.
177 const syncZone = ambientZone.fork(new SyncTestZoneSpec(`jasmine.describe#${description}`));
178 return syncZone.run(describeBody, this, arguments as any as any[]);
179 };
180 }
181
182 function runInTestZone(
183 testBody: Function,

Callers 1

patchJasmineFunction · 0.70

Calls 2

forkMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…