fix(testing): reintroduce and deprecate setBaseTestProviders (#9905)

This change reverts the removal of setBaseTestProviders that was
introduced in 8d746e3f67.

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.

See 8d746e3f67 for how to upgrade.
This commit is contained in:
Julie Ralph
2016-07-11 14:01:11 -07:00
committed by GitHub
parent e68252a79b
commit 29231877e6
8 changed files with 96 additions and 5 deletions

View File

@ -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
*