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

Function throwProxyZoneError

packages/zone.js/lib/zone-spec/proxy.ts:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11declare let jest: any;
12
13export function throwProxyZoneError(): never {
14 const jestPatched = typeof jest !== 'undefined' && jest['__zone_patch__'];
15 if (jestPatched) {
16 throw new Error(
17 'Only globals are patched with zone-testing. If you import `it`, `describe`, etc. directly, you cannot use `fakeAsync` or `waitForAsync`.',
18 );
19 } else {
20 throw new Error(
21 'ProxyZoneSpec is needed for the fakeAsync and waitForAsync test helpers but could not be found. ' +
22 'Make sure that your environment includes zone-testing.js',
23 );
24 }
25}
26
27export class ProxyZoneSpec implements ZoneSpec {
28 name: string = 'ProxyZone';

Callers 1

fakeAsyncFnFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected