File tree 1 file changed +4
-0
lines changed
packages/schematics/angular/application/other-files
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 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
describe ( 'AppComponent' , ( ) => {
5
6
beforeEach ( async ( ( ) => {
6
7
TestBed . configureTestingModule ( { < % if ( routing ) { % >
@@ -12,16 +13,19 @@ describe('AppComponent', () => {
12
13
] ,
13
14
} ) . compileComponents ( ) ;
14
15
} ) ) ;
16
+
15
17
it ( 'should create the app' , async ( ( ) => {
16
18
const fixture = TestBed . createComponent ( AppComponent ) ;
17
19
const app = fixture . debugElement . componentInstance ;
18
20
expect ( app ) . toBeTruthy ( ) ;
19
21
} ) ) ;
22
+
20
23
it ( `should have as title '<%= name %>'` , async ( ( ) => {
21
24
const fixture = TestBed . createComponent ( AppComponent ) ;
22
25
const app = fixture . debugElement . componentInstance ;
23
26
expect ( app . title ) . toEqual ( '<%= name %>' ) ;
24
27
} ) ) ;
28
+
25
29
it ( 'should render title in a h1 tag' , async ( ( ) => {
26
30
const fixture = TestBed . createComponent ( AppComponent ) ;
27
31
fixture . detectChanges ( ) ;
You can’t perform that action at this time.
0 commit comments