angular/packages/platform-server/testing/src/server.ts
Andrew Kushnir f4b59770e1 refactor(platform-server): switching to relative imports within the platform-server package (#60559)
This commit updates scripts within `packages/platform-server` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:52 +00:00

42 lines
1.2 KiB
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 {createPlatformFactory, NgModule, platformCore, StaticProvider} from '@angular/core';
import {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic';
import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing';
import {
ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS,
ɵSERVER_RENDER_PROVIDERS as SERVER_RENDER_PROVIDERS,
} from '../../index';
const INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS: StaticProvider[] = [
...INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
...INTERNAL_SERVER_PLATFORM_PROVIDERS,
];
/**
* Platform for testing
*
* @publicApi
*/
export const platformServerTesting = createPlatformFactory(
platformCore,
'serverTesting',
INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS,
);
/**
* NgModule for testing.
*
* @publicApi
*/
@NgModule({
exports: [BrowserDynamicTestingModule],
providers: SERVER_RENDER_PROVIDERS,
})
export class ServerTestingModule {}