mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Note: `--require` does not work for ESM. `--import` does not exist in the current Node versions. Started being available in NodeJS v19. A custom entry-point script, already supported by dev-infra, simplifies the whole logic and solves the ESM case. PR Close #48521
20 lines
760 B
TypeScript
20 lines
760 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 '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports.
|
|
|
|
import {TestBed} from '@angular/core/testing';
|
|
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
|
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
|
|
|
TestBed.initTestEnvironment(
|
|
[BrowserDynamicTestingModule, NoopAnimationsModule], platformBrowserDynamicTesting());
|
|
|
|
(window as any).isNode = false;
|
|
(window as any).isBrowser = true;
|
|
(window as any).global = window;
|