From f389b5a961278d0586a000d8071d33b65170aa7f Mon Sep 17 00:00:00 2001 From: Mathias Raacke Date: Tue, 3 May 2016 23:14:12 +0200 Subject: [PATCH] docs(changelog): add missing breaking changes for testing providers Closes #8440 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4932269562..906376969b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,7 +137,42 @@ To import various symbols please adjust the paths in the following way: - `DebugNode.locals` has been removed. Use the new methods `DebugElement.references` to get the references that are present on this element, or `DebugElement.context` to get the context of the `EmbeddedViewRef` or the component to which the element belongs. +* - Depending on if you are using precompiled templates or you are compiling templates on the fly, the setup for the base test providers has changed: +Before: +```js +// Somewhere in test setup +import {setBaseTestProviders} from 'angular2/testing'; +import { + TEST_BROWSER_PLATFORM_PROVIDERS, + TEST_BROWSER_APPLICATION_PROVIDERS +} from 'angular2/platform/testing/browser'; +setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS, + TEST_BROWSER_APPLICATION_PROVIDERS); +``` +After (applications that compile templates on the fly): +```js +// Somewhere in the test setup +import {setBaseTestProviders} from '@angular/core/testing'; +import { + TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, + TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS +} from '@angular/platform-browser-dynamic/testing'; +setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, + TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); +``` + +After (applications with precompiled templates): +```js +// Somewhere in the test setup +import {setBaseTestProviders} from '@angular/core/testing'; +import { + TEST_BROWSER_STATIC_PLATFORM_PROVIDERS, + TEST_BROWSER_STATIC_APPLICATION_PROVIDERS +} from '@angular/platform-browser/testing'; +setBaseTestProviders(TEST_BROWSER_STATIC_PLATFORM_PROVIDERS, + TEST_BROWSER_STATIC_APPLICATION_PROVIDERS); +```