-
Notifications
You must be signed in to change notification settings - Fork 26.2k
/
Copy pathserver.ts
44 lines (40 loc) · 1.36 KB
/
server.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @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
* @deprecated from v20.0.0, use e2e testing to verify SSR behavior.
*/
export const platformServerTesting = createPlatformFactory(
platformCore,
'serverTesting',
INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS,
);
/**
* NgModule for testing.
*
* @publicApi
* @deprecated from v20.0.0, use e2e testing to verify SSR behavior.
*/
@NgModule({
exports: [BrowserDynamicTestingModule],
providers: SERVER_RENDER_PROVIDERS,
})
export class ServerTestingModule {}