| 16 | export function patchJasmine(Zone: ZoneType): void { |
| 17 | Zone.__load_patch('jasmine', (global: any, Zone: ZoneType, api: _ZonePrivate) => { |
| 18 | const __extends = function (d: any, b: any) { |
| 19 | for (const p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; |
| 20 | function __(this: Object) { |
| 21 | this.constructor = d; |
| 22 | } |
| 23 | d.prototype = |
| 24 | b === null ? Object.create(b) : ((__.prototype = b.prototype), new (__ as any)()); |
| 25 | }; |
| 26 | // Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs |
| 27 | // in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503) |
| 28 | if (!Zone) throw new Error('Missing: zone.js'); |