angular/packages/zone.js/test/browser-zone-setup.ts
JiaLiPassion 848a00956e feat(zone.js): add AsyncStackTaggingZoneSpec implementation (#46693)
Chrome has an experimental API to improve the debug experience of the
async tasks.
The details can be found here https://bugs.chromium.org/p/chromium/issues/detail?id=332624#c29

This commit add the `async stack tagging` support in the `zone.js`.
User can `import 'zone.js/plugins/async-stack-tagging';` to enable this
feature.

PR Close #46693
2022-07-11 20:01:50 +00:00

30 lines
1.1 KiB
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
*/
if (typeof window !== 'undefined') {
const zoneSymbol = (window as any).Zone.__symbol__;
(window as any)['__Zone_enable_cross_context_check'] = true;
(window as any)[zoneSymbol('fakeAsyncAutoFakeAsyncWhenClockPatched')] = true;
}
import '../lib/common/to-string';
import '../lib/browser/api-util';
import '../lib/browser/browser-legacy';
import '../lib/browser/browser';
import '../lib/browser/canvas';
import '../lib/common/fetch';
import '../lib/browser/webapis-user-media';
import '../lib/browser/webapis-media-query';
import '../lib/testing/zone-testing';
import '../lib/zone-spec/task-tracking';
import '../lib/zone-spec/wtf';
import '../lib/zone-spec/async-stack-tagging';
import '../lib/extra/cordova';
import '../lib/testing/promise-testing';
import '../lib/testing/async-testing';
import '../lib/testing/fake-async';
import '../lib/browser/webapis-resize-observer';
import '../lib/rxjs/rxjs-fake-async';