2
2
3
3
> Lightweight utility functions to test Angular components.
4
4
5
- [ ![ Styled with prettier ] [ prettier -badge]] [ prettier ]
5
+ [ ![ Build status ] [ build -badge]] [ build ]
6
6
[ ![ npm] [ npm-badge ]] [ npm ]
7
+ [ ![ Styled with prettier] [ prettier-badge ]] [ prettier ]
7
8
[ ![ MIT License] [ license-badge ]] [ license ]
8
9
[ ![ Code of Conduct] [ coc-badge ]] [ coc ]
9
10
@@ -112,7 +113,7 @@ Calls the the Angular `TestBed.get` function.
112
113
113
114
You can find some examples in the [ tests folder] ( https://github.com/timdeschryver/ngx-testing-library/tree/master/projects/ngx-testing-library/tests ) .
114
115
115
- Here is how "default" specifications are written with ` ngx-testing-library ` .
116
+ Here is how the "default" specifications can be written with ` ngx-testing-library ` .
116
117
117
118
Before:
118
119
@@ -133,7 +134,7 @@ describe('AppComponent', () => {
133
134
expect (app .title ).toEqual (' my-awesome-app' );
134
135
}));
135
136
136
- it (' should render title in a h1 tag' , async (() => {
137
+ it (` should render title in a h1 tag ` , async (() => {
137
138
const fixture = TestBed .createComponent (AppComponent );
138
139
fixture .detectChanges ();
139
140
const compiled = fixture .debugElement .nativeElement ;
@@ -145,8 +146,8 @@ describe('AppComponent', () => {
145
146
After:
146
147
147
148
``` ts
148
- import { AppComponent } from ' ./app.component' ;
149
149
import { createComponent } from ' ngx-testing-library' ;
150
+ import { AppComponent } from ' ./app.component' ;
150
151
151
152
it (` should have as title 'my-awesome-app' ` , async () => {
152
153
const { getByText } = await createComponent (' <app-root></app-root>' , {
@@ -172,6 +173,8 @@ it(`should render title in a h1 tag`, async () => {
172
173
173
174
MIT
174
175
176
+ [ build-badge ] : https://circleci.com/gh/timdeschryver/ngx-testing-library/tree/master.svg?style=shield
177
+ [ build ] : https://circleci.com/gh/timdeschryver/ngx-testing-library/tree/master
175
178
[ prettier-badge ] : https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
176
179
[ prettier ] : https://github.com/prettier/prettier
177
180
[ npm-badge ] : https://img.shields.io/npm/v/ngx-testing-library.svg
0 commit comments