angular/packages/platform-browser-dynamic/testing/src/testing.ts
Alan Agius 8e8ccc7927 fix(platform-browser): ensure platformBrowserTesting includes platformBrowser providers (#60480)
Previously, `platformBrowserTesting` did not include any `platformBrowser` providers, causing an inconsistency with `platformBrowserDynamicTesting`.

This update resolves the issue by restructuring platform inheritance to ensure proper provider inclusion:

- `platformCore → platformBrowser → platformBrowserTesting`
- `platformBrowser → platformBrowserDynamic → platformBrowserDynamicTesting`

Now, `platformBrowserTesting` correctly inherits from `platformBrowser`, aligning with the expected behavior.

PR Close #60480
2025-03-20 12:33:13 -07:00

29 lines
734 B
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, PlatformRef, StaticProvider} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {BrowserTestingModule} from '@angular/platform-browser/testing';
/**
* @publicApi
*/
export const platformBrowserDynamicTesting = createPlatformFactory(
platformBrowserDynamic,
'browserDynamicTesting',
);
/**
* NgModule for testing.
*
* @publicApi
*/
@NgModule({
exports: [BrowserTestingModule],
})
export class BrowserDynamicTestingModule {}