@@ -38,7 +38,8 @@ await render(AppComponent)
3838Instead of passing the component's type as first argument, you can also provide
3939a template. This practice is required to render directives but can also be
4040applied to components, it might even be more useful. The directive's (or
41- component's) type must then be added to the ` declarations ` .
41+ component's) type must then be added to the ` imports ` (or ` declarations ` in case
42+ of non-standalone components).
4243
4344** example with directive** :
4445
@@ -103,12 +104,17 @@ the component.
103104` ` ` ts
104105// using a manual callback
105106const sendValue = (value) => { ... }
107+ await render(AppComponent, {
108+ on: {
109+ send: (value) => sendValue(value),
110+ }
111+ })
112+
106113// using a (jest) spy
107114const sendValueSpy = jest.fn()
108115
109116await render(AppComponent, {
110117 on: {
111- send: (value) => sendValue(value),
112118 send: sendValueSpy
113119 }
114120})
@@ -120,7 +126,7 @@ A collection of components, directives and pipes needed to render the component.
120126For example , nested components of the component .
121127
122128For more info see the
123- [Angular docs ](https :// angular.io/api/core/NgModule #declarations).
129+ [Angular docs ](https :// angular.dev/guide/ngmodules/overview #declarations).
124130
125131** default ** : ` [] `
126132
@@ -137,7 +143,7 @@ await render(AppComponent, {
137143Set the defer blocks behavior .
138144
139145For more info see the
140- [Angular docs ](https :// angular.io /api/core/testing/DeferBlockBehavior)
146+ [Angular docs ](https :// angular.dev /api/core/testing/DeferBlockBehavior)
141147
142148** default ** : ` undefined ` (uses ` DeferBlockBehavior.Manual ` , which is different
143149from the Angular default of ` DeferBlockBehavior.Playthrough ` )
@@ -155,7 +161,7 @@ await render(AppComponent, {
155161Set the initial state of a deferrable blocks in a component .
156162
157163For more info see the
158- [Angular docs ](https :// angular.io /api/core/testing/DeferBlockState)
164+ [Angular docs ](https :// angular.dev /api/core/testing/DeferBlockState)
159165
160166** default ** : ` undefined ` (uses the Angular default , which is
161167` DeferBlockState.Placeholder ` )
@@ -177,7 +183,7 @@ These will be provided at the component level. To inject dependencies at the
177183module level , use [` providers ` ](#providers ).
178184
179185For more info see the
180- [Angular docs ](https :// angular.io/api/core/Directive#providers ).
186+ [Angular docs ](https :// angular.dev/guide/di/hierarchical-dependency-injection#example-providing-services-in-component ).
181187
182188** default ** : ` [] `
183189
@@ -273,7 +279,7 @@ modules. Adds `NoopAnimationsModule` by default if `BrowserAnimationsModule`
273279isn ' t added to the collection
274280
275281For more info see the
276- [Angular docs ](https :// angular.io/api/core/NgModule #imports).
282+ [Angular docs ](https :// angular.dev/guide/components #imports-in-the-component-decorator ).
277283
278284** default ** : ` [NoopAnimationsModule] `
279285
@@ -294,7 +300,7 @@ These will be provided at the module level. To inject dependencies at the
294300component level , use [` componentProviders ` ](#componentProviders ).
295301
296302For more info see the
297- [Angular docs ](https :// angular.io/api/core/NgModule# providers).
303+ [Angular docs ](https :// angular.dev/guide/di/dependency-injection- providers# ).
298304
299305** default ** : ` [] `
300306
@@ -331,7 +337,7 @@ await render(AppComponent, {
331337
332338The route configuration to set up the router service via
333339` RouterTestingModule.withRoutes ` . For more info see the
334- [Angular Routes docs ](https :// angular.io /api/router/Routes).
340+ [Angular Routes docs ](https :// angular.dev /api/router/Routes).
335341
336342** default ** : ` [] `
337343
@@ -360,7 +366,7 @@ A collection of schemas needed to render the component. Allowed values are
360366` NO_ERRORS_SCHEMA ` and ` CUSTOM_ELEMENTS_SCHEMA ` .
361367
362368For more info see the
363- [Angular docs ](https :// angular.io/api/core/NgModule# schemas).
369+ [Angular docs ](https :// angular.dev/guide/components/advanced-configuration#custom-element- schemas).
364370
365371** default ** : ` [] `
366372
@@ -511,20 +517,20 @@ expect(screen.getByTestId('name-value').textContent).toBe('Sarah')
511517Trigger a change detection cycle for the component .
512518
513519For more info see the
514- [Angular docs ](https :// angular.io /api/core/testing/ComponentFixture#detectChanges).
520+ [Angular docs ](https :// angular.dev /api/core/testing/ComponentFixture#detectChanges).
515521
516522### ` debugElement `
517523
518524The Angular ` DebugElement ` of the component .
519525
520- For more info see the [Angular docs ](https :// angular.io /api/core/DebugElement).
526+ For more info see the [Angular docs ](https :// angular.dev /api/core/DebugElement).
521527
522528### ` fixture `
523529
524530The Angular ` ComponentFixture ` of the component .
525531
526532For more info see the
527- [Angular docs ](https :// angular.io /api/core/testing/ComponentFixture).
533+ [Angular docs ](https :// angular.dev /api/core/testing/ComponentFixture).
528534
529535` ` ` typescript
530536const {fixture} = await render(AppComponent)
0 commit comments