angular/packages/platform-browser-dynamic/testing/src/testing.ts
Matthieu Riegler a4e2139620 refactor(platform-browser): Deprecate the platform-browser-dynamic package (#61043)
All entries of the `@angular/platform-browser-dynamic` package are now deprecated.
We now recommend using the `@angular/platform-browser` package instead.
In case a JIT application/testing environment is complaining about missing the compiler also add `import '@angular/compiler'`

DEPRECATED: All entries of the `@angular/platform-browser-dynamic`

PR Close #61043
2025-05-15 09:48:15 -07:00

28 lines
1 KiB
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 '../../index';
import {BrowserTestingModule} from '@angular/platform-browser/testing';
/**
* @deprecated Use the `platformBrowserTesting` function instead from `@angular/platform-browser/testing`.
* In case you are not in a CLI app and rely on JIT compilation, you might also need to import `@angular/compiler`
*/
export const platformBrowserDynamicTesting: (extraProviders?: StaticProvider[]) => PlatformRef =
createPlatformFactory(platformBrowserDynamic, 'browserDynamicTesting');
/**
* NgModule for testing.
*
* @deprecated Use the `BrowserTestingModule` from `@angular/platform-browser/testing` instead.
*/
@NgModule({
exports: [BrowserTestingModule],
})
export class BrowserDynamicTestingModule {}