angular/packages/zone.js/test/node_entry_point.init.ts
Doug Parker 8af7d3a50b refactor(zone.js): update Node test entry point to call patch functions (#53443)
This executes the patches in the top-level scope of Node tests.

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

43 lines
1.3 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
*/
/**
* @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 './test-env-setup-jasmine';
import './wtf_mock';
import {patchJasmine} from '../lib/jasmine/jasmine';
import {rollupMain} from '../lib/node/main';
import {patchRxJs} from '../lib/rxjs/rxjs';
import {patchRxJsFakeAsync} from '../lib/rxjs/rxjs-fake-async';
import {rollupTesting} from '../lib/testing/zone-testing';
import {patchTaskTracking} from '../lib/zone-spec/task-tracking';
import {patchWtf} from '../lib/zone-spec/wtf';
import {setupNodeEnv} from './node-env-setup';
import {setupFakePolyfill} from './test_fake_polyfill';
// Must be loaded before zone loads, so that zone can detect WTF.
setupNodeEnv();
setupFakePolyfill();
// Setup tests for Zone without microtask support
const Zone = rollupMain();
// Zone symbol prefix is set to '__zone_symbol2__' in node-env-setup.ts.
rollupTesting(Zone);
patchTaskTracking(Zone);
patchWtf(Zone);
patchRxJs(Zone);
patchRxJsFakeAsync(Zone);
patchJasmine(Zone);