From 242ef1ace10e9a5a393c521e22e553324d08f592 Mon Sep 17 00:00:00 2001 From: Omar Hasan Date: Mon, 29 Jun 2020 09:20:56 +0200 Subject: [PATCH] docs: mention for depreciation for `Testbed.get()` (#37815) As mention in https://angular.io/guide/deprecations for this API, it may be important mention for this to make developers migrate or avoid using it PR Close #37815 --- aio/content/guide/testing.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md index e4510e730d..7a9d564dfc 100644 --- a/aio/content/guide/testing.md +++ b/aio/content/guide/testing.md @@ -359,10 +359,11 @@ Then inject it inside a test by calling `TestBed.inject()` with the service clas
-**Note:** We used to have `TestBed.get()` instead of `TestBed.inject()`. -The `get` method wasn't type safe, it always returned `any`, and this is error prone. -We decided to migrate to a new function instead of updating the existing one given -the large scale use that would have an immense amount of breaking changes. +**Note:** `TestBed.get()` was deprecated as of Angular version 9. +To help minimize breaking changes, Angular introduces a +new function called `TestBed.inject()`, which you should use instead. +For information on the removal of `TestBed.get()`, +see its entry in the [Deprecations index](guide/deprecations#index).