mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
29 lines
734 B
TypeScript
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 {}
|