File tree 1 file changed +21
-4
lines changed
packages/angular-cli/blueprints/component/files/__path__
1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
/* tslint:disable:no-unused-variable */
2
+ import { async , ComponentFixture , TestBed } from '@angular/core/testing' ;
3
+ import { By } from '@angular/platform-browser' ;
4
+ import { DebugElement } from '@angular/core' ;
2
5
3
- import { TestBed , async } from '@angular/core/testing' ;
4
6
import { < %= classifiedModuleName % > Component } from './<%= dasherizedModuleName %>.component' ;
5
7
6
- describe ( 'Component: <%= classifiedModuleName %>' , ( ) => {
7
- it ( 'should create an instance' , ( ) => {
8
- let component = new < %= classifiedModuleName % > Component ( ) ;
8
+ describe ( '<%= classifiedModuleName %>Component' , ( ) => {
9
+ let component : < %= classifiedModuleName % > Component ;
10
+ let fixture : ComponentFixture < < %= classifiedModuleName % > Component > ;
11
+
12
+ beforeEach ( async ( ( ) => {
13
+ TestBed . configureTestingModule ( {
14
+ declarations : [ < %= classifiedModuleName % > Component ]
15
+ } )
16
+ . compileComponents ( ) ;
17
+ } ) ) ;
18
+
19
+ beforeEach ( ( ) => {
20
+ fixture = TestBed . createComponent ( < %= classifiedModuleName % > Component ) ;
21
+ component = fixture . componentInstance ;
22
+ fixture . detectChanges ( ) ;
23
+ } ) ;
24
+
25
+ it ( 'should create' , ( ) => {
9
26
expect ( component ) . toBeTruthy ( ) ;
10
27
} ) ;
11
28
} ) ;
You can’t perform that action at this time.
0 commit comments