8000 refactor(platform-server): deprecate the testing entry point by jkrems · Pull Request #60915 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

refactor(platform-server): deprecate the testing entry point #60915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(platform-server): deprecate the testing entry point
DEPRECATED: `@angular/platform-server/testing`

Use e2e tests to verify SSR behavior instead.
  • Loading branch information
jkrems committed Apr 18, 2025
commit 470ae6c9748a461c0b103aef6e754a9790dafe73
4 changes: 2 additions & 2 deletions goldens/public-api/platform-server/testing/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import * as i0 from '@angular/core';
import * as i1 from '@angular/platform-browser-dynamic/testing';
import { StaticProvider } from '@angular/core';

// @public
// @public @deprecated
export const platformServerTesting: (extraProviders?: StaticProvider[]) => i0.PlatformRef;

// @public
// @public @deprecated
export class ServerTestingModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ServerTestingModule, never>;
Expand Down
6 changes: 5 additions & 1 deletion packages/platform-server/testing/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Supplies a testing module for the Angular platform server subsystem.
Supplies a testing module for the Angular platform server subsystem.
This secondary entry point is deprecated. Use e2e tests to verify SSR
behavior instead of `TestBed`.

See [Angular deprecation policy](reference/releases#deprecation-policy).
2 changes: 2 additions & 0 deletions packages/platform-server/testing/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS: StaticProvider[] = [
* Platform for testing
*
* @publicApi
* @deprecated from v20.0.0, use e2e testing to verify SSR behavior.
*/
export const platformServerTesting = createPlatformFactory(
platformCore,
Expand All @@ -34,6 +35,7 @@ export const platformServerTesting = createPlatformFactory(
* NgModule for testing.
*
* @publicApi
* @deprecated from v20.0.0, use e2e testing to verify SSR behavior.
*/
@NgModule({
exports: [BrowserDynamicTestingModule],
Expand Down
0