/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/testing/browser_tests.init.mts
29 строк
952 B
Andrew Scott
refactor(core): Update tests for zoneless by default (#63668)
10 сен 2025, 00:41
10 сен 2025, 00:41
c357650
Код
Авторство
О чём код?
/** * @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'; import './zone_base_setup.mjs'; import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports. import {NgModule, provideZonelessChangeDetection} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {BrowserTestingModule, platformBrowserTesting} from '@angular/platform-browser/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; @NgModule({ providers: [provideZonelessChangeDetection()], }) export class TestModule {} TestBed.initTestEnvironment( [BrowserTestingModule, NoopAnimationsModule, TestModule], platformBrowserTesting(), ); (window as any).isNode = false; (window as any).isBrowser = true; (window as any).global = window;