| 11 | declare let jest: any; |
| 12 | |
| 13 | export 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 | |
| 27 | export class ProxyZoneSpec implements ZoneSpec { |
| 28 | name: string = 'ProxyZone'; |