fix(testing): reintroduce and deprecate setBaseTestProviders (#9905)
This change reverts the removal of setBaseTestProviders that was introduced in8d746e3f67
. Instead, setBaseTestProviders and the providers provided from `@angular/platform-browser-dynamic/testing` and `@angular/server/testing` will still work for the next release, but are deprecated. See8d746e3f67
for how to upgrade.
This commit is contained in:
@ -35,6 +35,15 @@ export const TEST_BROWSER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[
|
||||
{provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true}
|
||||
];
|
||||
|
||||
/**
|
||||
* @deprecated Use initTestEnvironment with BrowserTestModule instead.
|
||||
*/
|
||||
export const TEST_BROWSER_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = [
|
||||
BROWSER_APP_PROVIDERS, {provide: APP_ID, useValue: 'a'}, ELEMENT_PROBE_PROVIDERS,
|
||||
{provide: NgZone, useFactory: createNgZone},
|
||||
{provide: AnimationDriver, useValue: AnimationDriver.NOOP}
|
||||
];
|
||||
|
||||
/**
|
||||
* Platform for testing
|
||||
*
|
||||
|
Reference in New Issue
Block a user