angular/tools/testing/browser_tests.init.ts
Matthieu Riegler 8f803aa81a build: Run browsers tests without platform-browser-dynamic (#60937) (#61060)
Use the regular `platform-browser` providers instead.

PR Close #61060
2025-04-30 08:21:02 -07:00

21 lines
790 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.dev/license
*/
import 'zone.js/lib/browser/rollup-main';
import './zone_base_setup';
import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports.
import {TestBed} from '@angular/core/testing';
import {BrowserTestingModule, platformBrowserTesting} from '@angular/platform-browser/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
TestBed.initTestEnvironment([BrowserTestingModule, NoopAnimationsModule], platformBrowserTesting());
(window as any).isNode = false;
(window as any).isBrowser = true;
(window as any).global = window;