2017-12-16 19:35:47 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 19:08:49 +00:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2017-12-16 19:35:47 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
2024-09-20 15:23:15 +00:00
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
2017-12-16 19:35:47 +00:00
|
|
|
*/
|
|
|
|
|
|
2025-04-28 23:58:01 +00:00
|
|
|
import 'reflect-metadata';
|
|
|
|
|
|
2019-10-06 03:06:53 +00:00
|
|
|
import 'zone.js/lib/node/rollup-main';
|
2025-05-23 17:27:09 +00:00
|
|
|
import './zone_base_setup.mjs';
|
2017-12-16 19:35:47 +00:00
|
|
|
|
2017-12-17 23:10:54 +00:00
|
|
|
(global as any).isNode = true;
|
|
|
|
|
(global as any).isBrowser = false;
|
|
|
|
|
|
2018-10-24 23:02:25 +00:00
|
|
|
import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports.
|
2017-12-16 19:35:47 +00:00
|
|
|
// Init TestBed
|
|
|
|
|
import {TestBed} from '@angular/core/testing';
|
2025-05-23 17:27:09 +00:00
|
|
|
import {ServerTestingModule, platformServerTesting} from '@angular/platform-server/testing';
|
|
|
|
|
import {ɵDominoAdapter as DominoAdapter} from '@angular/platform-server';
|
2023-02-27 17:10:23 +00:00
|
|
|
import domino from '../../packages/platform-server/src/bundled-domino';
|
2017-12-16 19:35:47 +00:00
|
|
|
|
|
|
|
|
TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting());
|
|
|
|
|
DominoAdapter.makeCurrent();
|
2022-12-10 14:49:12 +00:00
|
|
|
(global as any).document =
|
|
|
|
|
(DominoAdapter as any).defaultDoc ||
|
|
|
|
|
((DominoAdapter as any).defaultDoc = domino.createDocument());
|