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

Function withProxyZone

packages/core/test/fake_async_spec.ts:16–20  ·  view source on GitHub ↗
(fn: T)

Source from the content-addressed store, hash-verified

14const ProxyZoneSpec: {new (): ZoneSpec; assertPresent: () => void} = (Zone as any)['ProxyZoneSpec'];
15const proxyZone = Zone.root.fork(new ProxyZoneSpec());
16const withProxyZone = <T extends Function>(fn: T): T => {
17 return function (this: unknown, ...args: unknown[]) {
18 return proxyZone.run(fn, this, args);
19 } as unknown as T;
20};
21
22describe('fake async', () => {
23 it(

Calls 1

runMethod · 0.65

Tested by

no test coverage detected