docs: Add standalone edits to "Testing Components" (#51451)

Minimal updates to the "Testing Components" guide for standalone-by-default aio.

PR Close #51451
This commit is contained in:
Dylan Hunn 2023-08-21 14:12:18 -07:00 committed by Jessica Janiuk
parent 3dc74f3ac5
commit 9753347f8a

View file

@ -54,6 +54,12 @@ When a component has dependencies, you might want to use the `TestBed` to both c
The following `WelcomeComponent` depends on the `UserService` to know the name of the user to greet.
<div class="alert is-important">
Remember to either *import* or *provide* each standalone component you want to test.
</div>
<code-example header="app/welcome/welcome.component.ts" path="testing/src/app/welcome/welcome.component.ts" region="class"></code-example>
You might start by creating a mock of the `UserService` that meets the minimum needs of this component.