File tree 1 file changed +1
-22
lines changed
docs/angular-testing-library
1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -388,27 +388,6 @@ const {debug} = await render(AppComponent)
388
388
debug()
389
389
` ` `
390
390
391
- ### ` change `
392
-
393
- Change the input of the component . This calls ` detectChanges ` after the props
394
- are updated .
395
-
396
- ` ` ` typescript
397
- const {change} = await render(Counter, {
398
- componentProperties: {count: 4, name: 'Sarah'},
399
- })
400
-
401
- expect(screen.getByTestId('count-value').textContent).toBe('4')
402
- expect(screen.getByTestId('name-value').textContent).toBe('Sarah')
403
-
404
- change({count: 7})
405
-
406
- // count updated to 7
407
- expect(screen.getByTestId('count-value').textContent).toBe('7')
408
- // name keeps the same value
409
- expect(screen.getByTestId('name-value').textContent).toBe('Sarah')
410
- ` ` `
411
-
412
391
### ` rerender `
413
392
414
393
Create and render a new instance of the component . Input properties that are not
@@ -422,7 +401,7 @@ const {rerender} = await render(Counter, {
422
401
expect(screen.getByTestId('count-value').textContent).toBe('4')
423
402
expect(screen.getByTestId('name-value').textContent).toBe('Sarah')
424
403
425
- await rerender({count: 7})
404
+ await rerender({componentProperties: { count: 7} })
426
405
427
406
// count updated to 7
428
407
expect(screen.getByTestId('count-value').textContent).toBe('7')
You can’t perform that action at this time.
0 commit comments