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

Function getOrCreateRootProxy

packages/zone.js/lib/zone-spec/fake-async-test.ts:1091–1106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1089}
1090
1091function getOrCreateRootProxy() {
1092 const ProxyZoneSpec = getProxyZoneSpec();
1093 if (ProxyZoneSpec === undefined) {
1094 throw new Error(
1095 'ProxyZoneSpec is needed for withProxyZone but could not be found. ' +
1096 'Make sure that your environment includes zone-testing.js',
1097 );
1098 }
1099 // Ensure the shared ProxyZoneSpec instance exists
1100 if (_sharedProxyZoneSpec === null) {
1101 _sharedProxyZoneSpec = new ProxyZoneSpec() as ProxyZoneSpec;
1102 }
1103
1104 _sharedProxyZone = Zone.root.fork(_sharedProxyZoneSpec);
1105 return _sharedProxyZone;
1106}
1107
1108/**
1109 * Flush any pending microtasks.

Callers 1

autoProxyFnFunction · 0.85

Calls 2

getProxyZoneSpecFunction · 0.85
forkMethod · 0.65

Tested by

no test coverage detected