@@ -3,15 +3,15 @@ id: intro
3
3
title : Angular Testing Library
4
4
---
5
5
6
- 🦔 [ ` @angular-extensions/ testing-library ` ] [ gh ] Simple and complete
6
+ 🦔 [ ` @testing-library/angular ` ] [ gh ] Simple and complete
7
7
[ Angular] ( https://angular.io ) testing utilities that encourage good testing
8
8
practices.
9
9
10
10
``` bash
11
- npm install --save-dev angular-extensions/ testing-library
11
+ npm install --save-dev @ testing-library/angular
12
12
```
13
13
14
- - [ ` @angular-extensions/ testing-library ` on GitHub] [ gh ]
14
+ - [ ` @testing-library/angular- testing-library ` on GitHub] [ gh ]
15
15
16
16
## Usage
17
17
@@ -42,7 +42,7 @@ export class CounterComponent {
42
42
counter.component.spec.ts
43
43
44
44
``` typescript
45
- import { render } from ' @angular-extensions/ testing-library'
45
+ import { render } from ' @testing-library/angular '
46
46
import CounterComponent from ' ./counter.component.ts'
47
47
48
48
describe (' Counter' , () => {
@@ -68,19 +68,20 @@ describe('Counter', () => {
68
68
69
69
## API
70
70
71
- There is a small difference between ` @angular-extensions/ testing-library ` and
72
- the ` testing-library ` family, in this library we also expose all of the events
73
- via the ` render ` function. This is done to trigger Angular's change detection
74
- after each interaction.
71
+ There is a small difference between ` @testing-library/angular ` and the
72
+ ` testing-library ` family, in this library we also expose all of the events via
73
+ the ` render ` function. This is done to trigger Angular's change detection after
74
+ each interaction.
75
75
76
- You can also import these event via ` @angular-extensions/ testing-library ` , but
77
- the Angular's change detection will not be triggered automatically.
76
+ You can also import these event via ` @testing-library/angular ` , but the
77
+ Angular's change detection will not be triggered automatically.
78
78
79
- The same counts for all the queries provided by ` DOM Testing Library ` , these are
80
- also re-exported and can be imported via ` @angular-extensions/testing-library ` .
79
+ The same counts for all the queries provided by the DOM Testing Library
80
+ (` @testing-library/dom ` ), these are also re-exported and can be imported via
81
+ ` @testing-library/angular ` .
81
82
82
83
``` typescript
83
- import { getByText , click } from ' @angular-extensions/ testing-library'
84
+ import { getByText , click } from ' @testing-library/angular '
84
85
```
85
86
86
87
[ gh ] : https://github.com/testing-library/angular-testing-library
0 commit comments