1
1
import { TestBed , async } from '@angular/core/testing' ; < % if ( routing ) { % >
2
2
import { RouterTestingModule } from '@angular/router/testing' ; < % } % >
3
3
import { AppComponent } from './app.component' ;
4
-
4
+
5
5
describe ( 'AppComponent' , ( ) => {
6
6
beforeEach ( async ( ( ) => {
7
7
TestBed . configureTestingModule ( { < % if ( routing ) { % >
@@ -14,22 +14,22 @@ describe('AppComponent', () => {
14
14
} ) . compileComponents ( ) ;
15
15
} ) ) ;
16
16
17
- it ( 'should create the app' , async ( ( ) => {
17
+ it ( 'should create the app' , ( ) => {
18
18
const fixture = TestBed . createComponent ( AppComponent ) ;
19
19
const app = fixture . debugElement . componentInstance ;
20
20
expect ( app ) . toBeTruthy ( ) ;
21
- } ) ) ;
21
+ } ) ;
22
22
23
- it ( `should have as title '<%= name %>'` , async ( ( ) => {
23
+ it ( `should have as title '<%= name %>'` , ( ) => {
24
24
const fixture = TestBed . createComponent ( AppComponent ) ;
25
25
const app = fixture . debugElement . componentInstance ;
26
26
expect ( app . title ) . toEqual ( '<%= name %>' ) ;
27
- } ) ) ;
27
+ } ) ;
28
28
29
- it ( 'should render title in a h1 tag' , async ( ( ) => {
29
+ it ( 'should render title in a h1 tag' , ( ) => {
30
30
const fixture = TestBed . createComponent ( AppComponent ) ;
31
31
fixture . detectChanges ( ) ;
32
32
const compiled = fixture . debugElement . nativeElement ;
33
33
expect ( compiled . querySelector ( 'h1' ) . textContent ) . toContain ( 'Welcome to <%= name %>!' ) ;
34
- } ) ) ;
34
+ } ) ;
35
35
} ) ;
0 commit comments