1
- # ngx- testing-library
1
+ # testing-library
2
2
3
3
> Lightweight utility functions to test Angular components.
4
4
25
25
26
26
## Installation
27
27
28
- Install ` ngx- testing-library` from [ npm] and add it your ` devDependencies ` :
28
+ Install ` @angular-extensions/ testing-library` from [ npm] and add it your ` devDependencies ` :
29
29
30
- ` npm install ngx- testing-library --save-dev `
30
+ ` npm install @angular-extensions/ testing-library --save-dev `
31
31
32
32
## Why
33
33
@@ -36,7 +36,7 @@ Install `ngx-testing-library` from [npm] and add it your `devDependencies`:
36
36
37
37
## What
38
38
39
- ngx- testing-library is an Angular adapter around [ dom-testing-library] [ dom-testing-library ] ,
39
+ ` @angular-extensions/ testing-library` is an Angular adapter around [ dom-testing-library] [ dom-testing-library ] ,
40
40
which provides lightweight utility functions to test UI components. Your tests will work with actual DOM nodes.
41
41
42
42
## How
@@ -50,15 +50,15 @@ This method can be used in two ways:
50
50
Based on a template:
51
51
52
52
``` ts
53
- import { createComponent } from ' ngx- testing-library' ;
53
+ import { createComponent } from ' @angular-extensions/ testing-library' ;
54
54
55
55
createComponent (' <my-component [prop]="1"></my-component>' , options );
56
56
```
57
57
58
58
Based on a component type:
59
59
60
60
``` ts
61
- import { createComponent } from ' ngx- testing-library' ;
61
+ import { createComponent } from ' @angular-extensions/ testing-library' ;
62
62
63
63
createComponent (
64
64
{
@@ -117,9 +117,9 @@ Calls the the Angular `TestBed.get` function.
117
117
118
118
## Usage
119
119
120
- You can find some examples in the [ tests folder] ( https://github.com/timdeschryver/ngx- testing-library/tree/master/projects/ngx- testing-library/tests ) .
120
+ You can find some examples in the [ tests folder] ( https://github.com/angular-extensions/ testing-library/tree/master/projects/testing-library/tests ) .
121
121
122
- Here is how the "default" specifications can be written with ` ngx- testing-library` .
122
+ Here is how the "default" specifications can be written with ` @angular-extensions/ testing-library` .
123
123
124
124
Before:
125
125
@@ -152,7 +152,7 @@ describe('AppComponent', () => {
152
152
After:
153
153
154
154
``` ts
155
- import { createComponent } from ' ngx- testing-library' ;
155
+ import { createComponent } from ' @angular-extensions/ testing-library' ;
156
156
import { AppComponent } from ' ./app.component' ;
157
157
158
158
it (` should have as title 'my-awesome-app' ` , async () => {
@@ -179,16 +179,16 @@ it(`should render title in a h1 tag`, async () => {
179
179
180
180
MIT
181
181
182
- [ build-badge ] : https://circleci.com/gh/timdeschryver/ngx- testing-library/tree/master.svg?style=shield
183
- [ build ] : https://circleci.com/gh/timdeschryver/ngx- testing-library/tree/master
182
+ [ build-badge ] : https://circleci.com/gh/angular-extensions/ testing-library/tree/master.svg?style=shield
183
+ [ build ] : https://circleci.com/gh/angular-extensions/ testing-library/tree/master
184
184
[ sr-badge ] : https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
185
185
[ sr ] : https://github.com/semantic-release/semantic-release
186
186
[ prettier-badge ] : https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
187
187
[ prettier ] : https://github.com/prettier/prettier
188
- [ npm-badge ] : https://img.shields.io/npm/v/ngx- testing-library.svg
189
- [ npm ] : https://www.npmjs.com/package/ngx- testing-library
190
- [ license-badge ] : https://img.shields.io/npm/l/ngx- testing-library.svg?style=flat-square
191
- [ license ] : https://github.com/timdeschryver/ngx- testing-library/blob/master/LICENSE
188
+ [ npm-badge ] : https://img.shields.io/npm/v/testing-library.svg
189
+ [ npm ] : https://www.npmjs.com/package/testing-library
190
+ [ license-badge ] : https://img.shields.io/npm/l/testing-library.svg?style=flat-square
191
+ [ license ] : https://github.com/angular-extensions/ testing-library/blob/master/LICENSE
192
192
[ coc-badge ] : https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
193
- [ coc ] : https://github.com/timdeschryver/ngx- testing-library/blob/master/CODE_OF_CONDUCT.md
193
+ [ coc ] : https://github.com/angular-extensions/ testing-library/blob/master/CODE_OF_CONDUCT.md
194
194
[ dom-testing-library ] : https://github.com/kentcdodds/dom-testing-library
0 commit comments