@@ -3,50 +3,36 @@ import { AppComponent } from './app.component';
3
3
import { AppModule } from './app.module' ;
4
4
5
5
describe ( 'AppComponent' , ( ) => {
6
- beforeEach (
7
- waitForAsync ( ( ) => {
8
- TestBed . configureTestingModule ( {
9
- imports : [ AppModule ] ,
10
- } ) . compileComponents ( ) ;
11
- } ) ,
12
- ) ;
6
+ beforeEach ( waitForAsync ( ( ) => {
7
+ TestBed . configureTestingModule ( {
8
+ imports : [ AppModule ] ,
9
+ } ) . compileComponents ( ) ;
10
+ } ) ) ;
13
11
14
- it (
15
- 'should create the app' ,
16
- waitForAsync ( ( ) => {
17
- const fixture = TestBed . createComponent ( AppComponent ) ;
18
- const app = fixture . debugElement . componentInstance ;
19
- expect ( app ) . toBeTruthy ( ) ;
20
- } ) ,
21
- ) ;
12
+ it ( 'should create the app' , waitForAsync ( ( ) => {
13
+ const fixture = TestBed . createComponent ( AppComponent ) ;
14
+ const app = fixture . debugElement . componentInstance ;
15
+ expect ( app ) . toBeTruthy ( ) ;
16
+ } ) ) ;
22
17
23
- it (
24
- `should have as title 'test-angular-project'` ,
25
- waitForAsync ( ( ) => {
26
- const fixture = TestBed . createComponent ( AppComponent ) ;
27
- const app = fixture . debugElement . componentInstance ;
28
- expect ( app . title ) . toEqual ( 'test-angular-project' ) ;
29
- } ) ,
30
- ) ;
18
+ it ( `should have as title 'test-angular-project'` , waitForAsync ( ( ) => {
19
+ const fixture = TestBed . createComponent ( AppComponent ) ;
20
+ const app = fixture . debugElement . componentInstance ;
21
+ expect ( app . title ) . toEqual ( 'test-angular-project' ) ;
22
+ } ) ) ;
31
23
32
- it (
33
- 'should render title in a h1 tag' ,
34
- waitForAsync ( ( ) => {
35
- const fixture = TestBed . createComponent ( AppComponent ) ;
36
- fixture . detectChanges ( ) ;
37
- const compiled = fixture . debugElement . nativeElement ;
38
- expect ( compiled . querySelector ( 'h1' ) . textContent ) . toContain (
39
- 'Welcome to test-angular-project!' ,
40
- ) ;
41
- } ) ,
42
- ) ;
24
+ it ( 'should render title in a h1 tag' , waitForAsync ( ( ) => {
25
+ const fixture = TestBed . createComponent ( AppComponent ) ;
26
+ fixture . detectChanges ( ) ;
27
+ const compiled = fixture . debugElement . nativeElement ;
28
+ expect ( compiled . querySelector ( 'h1' ) . textContent ) . toContain (
29
+ 'Welcome to test-angular-project!' ,
30
+ ) ;
31
+ } ) ) ;
43
32
44
- it (
45
- `should have list of pet store domains` ,
46
- waitForAsync ( ( ) => {
47
- const fixture = TestBed . createComponent ( AppComponent ) ;
48
- const app = fixture . debugElement . componentInstance ;
49
- expect ( app . domains ) . toEqual ( [ 'pet.domain' , 'user.domain' ] ) ;
50
- } ) ,
51
- ) ;
33
+ it ( `should have list of pet store domains` , waitForAsync ( ( ) => {
34
+ const fixture = TestBed . createComponent ( AppComponent ) ;
35
+ const app = fixture . debugElement . componentInstance ;
36
+ expect ( app . domains ) . toEqual ( [ 'pet.domain' , 'user.domain' ] ) ;
37
+ } ) ) ;
52
38
} ) ;
0 commit comments