2017-12-16 11:35:47 -08:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 12:08:49 -07:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2017-12-16 11:35:47 -08:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
2024-09-20 09:23:15 -06:00
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
2017-12-16 11:35:47 -08:00
|
|
|
*/
|
|
|
|
|
|
2025-04-28 16:58:01 -07:00
|
|
|
import 'reflect-metadata';
|
2025-06-09 21:39:42 +00:00
|
|
|
import 'zone.js';
|
2025-05-23 17:27:09 +00:00
|
|
|
import './zone_base_setup.mjs';
|
2017-12-16 11:35:47 -08:00
|
|
|
|
2017-12-17 15:10:54 -08:00
|
|
|
(global as any).isNode = true;
|
|
|
|
|
(global as any).isBrowser = false;
|
|
|
|
|
|
2018-10-24 16:02:25 -07:00
|
|
|
import '@angular/compiler'; // For JIT mode. Must be in front of any other @angular/* imports.
|
2017-12-16 11:35:47 -08:00
|
|
|
// Init TestBed
|
2025-09-09 12:24:22 -07:00
|
|
|
import {NgModule, provideZonelessChangeDetection} from '@angular/core';
|
2017-12-16 11:35:47 -08:00
|
|
|
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';
|
2026-03-25 10:44:00 +00:00
|
|
|
import domino from '../../packages/platform-server/third_party/domino/bundled-domino';
|
2017-12-16 11:35:47 -08:00
|
|
|
|
2025-09-09 12:24:22 -07:00
|
|
|
@NgModule({
|
|
|
|
|
providers: [provideZonelessChangeDetection()],
|
|
|
|
|
})
|
|
|
|
|
export class TestModule {}
|
|
|
|
|
|
|
|
|
|
TestBed.initTestEnvironment([ServerTestingModule, TestModule], platformServerTesting());
|
2017-12-16 11:35:47 -08:00
|
|
|
DominoAdapter.makeCurrent();
|
2022-12-10 14:49:12 +00:00
|
|
|
(global as any).document =
|
|
|
|
|
(DominoAdapter as any).defaultDoc ||
|
|
|
|
|
((DominoAdapter as any).defaultDoc = domino.createDocument());
|