diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md
index 5fe705c694d..d9b05689d53 100644
--- a/aio/content/guide/deprecations.md
+++ b/aio/content/guide/deprecations.md
@@ -74,8 +74,6 @@ v14 - v17
| `@angular/core` | [Factory-based signature of `ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent) | v15 |
| `@angular/core/testing` | [`TestBed.get`](#testing) | v12 |
| `@angular/core/testing` | [`async`](#testing) | v12 |
-| `@angular/core/testing` | [`aotSummaries` argument in `TestBed.initTestEnvironment`](#testing) | v14 |
-| `@angular/core/testing` | [`aotSummaries` field of the `TestModuleMetadata` type](#testing) | v14 |
| `@angular/forms` | [`FormBuilder.group` legacy options parameter](api/forms/FormBuilder#group) | v14 |
| `@angular/platform-server` | [`renderModuleFactory`](#platform-server) | v15 |
| `@angular/router` | [`relativeLinkResolution`](#relativeLinkResolution) | v16 |
@@ -148,8 +146,6 @@ In the [API reference section](api) of this site, deprecated APIs are indicated
|:--- |:--- |:--- |:--- |
| [`TestBed.get`](api/core/testing/TestBed#get) | [`TestBed.inject`](api/core/testing/TestBed#inject) | v9 | Same behavior, but type safe. |
| [`async`](api/core/testing/async) | [`waitForAsync`](api/core/testing/waitForAsync) | v10 | Same behavior, but rename to avoid confusion. |
-| [`aotSummaries` argument in `TestBed.initTestEnvironment`](api/core/testing/TestBed#inittestenvironment) | No replacement needed | v13 | Summary files are unused in Ivy. |
-| [`aotSummaries` field of the `TestModuleMetadata` type](api/core/testing/TestModuleMetadata) | No replacement needed | v13 | Summary files are unused in Ivy. |
diff --git a/aio/tests/e2e/src/api-pages.e2e-spec.ts b/aio/tests/e2e/src/api-pages.e2e-spec.ts
index f2ae8282de7..faa06c3fb0e 100644
--- a/aio/tests/e2e/src/api-pages.e2e-spec.ts
+++ b/aio/tests/e2e/src/api-pages.e2e-spec.ts
@@ -79,11 +79,11 @@ describe('Api pages', () => {
it('should show all overloads of interface methods', async () => {
await page.navigateTo('api/core/testing/TestBedStatic');
- expect(await (await page.getInstanceMethodOverloads('initTestEnvironment')).length).toEqual(2);
+ expect(await (await page.getInstanceMethodOverloads('inject')).length).toEqual(2);
});
it('should show all overloads of pseudo-class methods', async () => {
await page.navigateTo('api/core/testing/TestBed');
- expect(await (await page.getInstanceMethodOverloads('initTestEnvironment')).length).toEqual(2);
+ expect(await (await page.getInstanceMethodOverloads('inject')).length).toEqual(2);
});
});
diff --git a/goldens/public-api/core/testing/index.md b/goldens/public-api/core/testing/index.md
index aa4e3016710..8c992385608 100644
--- a/goldens/public-api/core/testing/index.md
+++ b/goldens/public-api/core/testing/index.md
@@ -114,8 +114,6 @@ export interface TestBed {
// @deprecated (undocumented)
get(token: any, notFoundValue?: any): any;
initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, options?: TestEnvironmentOptions): void;
- // @deprecated
- initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): void;
// (undocumented)
inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;
// (undocumented)
@@ -173,8 +171,6 @@ export interface TestBedStatic {
// @deprecated (undocumented)
get(token: any, notFoundValue?: any): any;
initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, options?: TestEnvironmentOptions): TestBed;
- // @deprecated
- initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
// (undocumented)
inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;
// (undocumented)
@@ -219,8 +215,6 @@ export class TestComponentRenderer {
// @public (undocumented)
export interface TestEnvironmentOptions {
- // @deprecated
- aotSummaries?: () => any[];
teardown?: ModuleTeardownOptions;
}
@@ -230,7 +224,6 @@ export type TestModuleMetadata = {
declarations?: any[];
imports?: any[];
schemas?: Array;
- aotSummaries?: () => any[];
teardown?: ModuleTeardownOptions;
};
diff --git a/packages/core/testing/src/r3_test_bed.ts b/packages/core/testing/src/r3_test_bed.ts
index 088fd6cae30..0a1a6aaa36b 100644
--- a/packages/core/testing/src/r3_test_bed.ts
+++ b/packages/core/testing/src/r3_test_bed.ts
@@ -80,9 +80,9 @@ export class TestBedRender3 implements TestBed {
*/
static initTestEnvironment(
ngModule: Type|Type[], platform: PlatformRef,
- summariesOrOptions?: TestEnvironmentOptions|(() => any[])): TestBed {
+ options?: TestEnvironmentOptions): TestBed {
const testBed = _getTestBedRender3();
- testBed.initTestEnvironment(ngModule, platform, summariesOrOptions);
+ testBed.initTestEnvironment(ngModule, platform, options);
return testBed;
}
@@ -230,15 +230,12 @@ export class TestBedRender3 implements TestBed {
*/
initTestEnvironment(
ngModule: Type|Type[], platform: PlatformRef,
- summariesOrOptions?: TestEnvironmentOptions|(() => any[])): void {
+ options?: TestEnvironmentOptions): void {
if (this.platform || this.ngModule) {
throw new Error('Cannot set base providers because it has already been called');
}
- // If `summariesOrOptions` is a function, it means that it's
- // an AOT summaries factory which Ivy doesn't support.
- TestBedRender3._environmentTeardownOptions =
- typeof summariesOrOptions === 'function' ? undefined : summariesOrOptions?.teardown;
+ TestBedRender3._environmentTeardownOptions = options?.teardown;
this.platform = platform;
this.ngModule = ngModule;
diff --git a/packages/core/testing/src/test_bed.ts b/packages/core/testing/src/test_bed.ts
index 4a2d2e9e13f..2d2cd8edabe 100644
--- a/packages/core/testing/src/test_bed.ts
+++ b/packages/core/testing/src/test_bed.ts
@@ -35,22 +35,6 @@ export interface TestBed {
initTestEnvironment(
ngModule: Type|Type[], platform: PlatformRef,
options?: TestEnvironmentOptions): void;
- /**
- * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
- * angular module. These are common to every test in the suite.
- *
- * This may only be called once, to set up the common providers for the current test
- * suite on the current platform. If you absolutely need to change the providers,
- * first use `resetTestEnvironment`.
- *
- * Test modules and platforms for individual platforms are available from
- * '@angular//testing'.
- *
- * @deprecated This API that allows providing AOT summaries is deprecated, since summary files are
- * unused in Ivy.
- */
- initTestEnvironment(
- ngModule: Type|Type[], platform: PlatformRef, aotSummaries?: () => any[]): void;
/**
* Reset the providers for the test injector.
diff --git a/packages/core/testing/src/test_bed_common.ts b/packages/core/testing/src/test_bed_common.ts
index 85dfdb2a258..fe17568a713 100644
--- a/packages/core/testing/src/test_bed_common.ts
+++ b/packages/core/testing/src/test_bed_common.ts
@@ -44,10 +44,6 @@ export type TestModuleMetadata = {
declarations?: any[],
imports?: any[],
schemas?: Array,
- /**
- * @deprecated With Ivy, AOT summary files are unused.
- */
- aotSummaries?: () => any[],
teardown?: ModuleTeardownOptions;
};
@@ -55,13 +51,6 @@ export type TestModuleMetadata = {
* @publicApi
*/
export interface TestEnvironmentOptions {
- /**
- * Provides a way to specify AOT summaries to use in TestBed.
- * This parameter is unused and deprecated in Ivy.
- *
- * @deprecated With Ivy, AOT summary files are unused.
- */
- aotSummaries?: () => any[];
/**
* Configures the test module teardown behavior in `TestBed`.
*/
@@ -102,22 +91,6 @@ export interface TestBedStatic {
initTestEnvironment(
ngModule: Type|Type[], platform: PlatformRef,
options?: TestEnvironmentOptions): TestBed;
- /**
- * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
- * angular module. These are common to every test in the suite.
- *
- * This may only be called once, to set up the common providers for the current test
- * suite on the current platform. If you absolutely need to change the providers,
- * first use `resetTestEnvironment`.
- *
- * Test modules and platforms for individual platforms are available from
- * '@angular//testing'.
- *
- * @deprecated This API that allows providing AOT summaries is deprecated, since summary files are
- * unused in Ivy.
- */
- initTestEnvironment(
- ngModule: Type|Type[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
/**
* Reset the providers for the test injector.