mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
3dc74f3ac5
commit
9753347f8a
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue