angular/tools/testing/zone_base_setup.ts
Doug Parker cc1b0f4e8e refactor(zone.js): update imports for Zone setup to invoke patches (#53443)
I initially tried switching to use public entry points under `zone.js/plugins/*`, however this file is both manually compiled for Saucelabs and also built with Bazel for a number of tests. The Bazel integration doesn't work well with depending on real NPM packages, so importing `zone.js/plugins/*` in that context doesn't really work. Instead we need to depend on the internals and manually call the `patch*` functions.

PR Close #53443
2024-03-15 18:11:34 -07:00

25 lines
870 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import 'reflect-metadata';
import {patchLongStackTrace} from 'zone.js/lib/zone-spec/long-stack-trace';
import {patchTaskTracking} from 'zone.js/lib/zone-spec/task-tracking';
import {patchProxyZoneSpec} from 'zone.js/lib/zone-spec/proxy';
import {patchSyncTest} from 'zone.js/lib/zone-spec/sync-test';
import {patchAsyncTest} from 'zone.js/lib/zone-spec/async-test';
import {patchFakeAsyncTest} from 'zone.js/lib/zone-spec/fake-async-test';
import {patchJasmine} from 'zone.js/lib/jasmine/jasmine';
patchLongStackTrace(Zone);
patchTaskTracking(Zone);
patchProxyZoneSpec(Zone);
patchSyncTest(Zone);
patchAsyncTest(Zone);
patchFakeAsyncTest(Zone);
patchJasmine(Zone);