File tree 3 files changed +12
-13
lines changed
packages/@angular/cli/blueprints/ng2/files/__path__/app
3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,16 @@ import { RouterTestingModule } from '@angular/router/testing';<% } %>
3
3
import { AppComponent } from './app.component' ;
4
4
5
5
describe ( 'AppComponent' , ( ) => {
6
- beforeEach ( ( ) => {
6
+ beforeEach ( async ( ( ) => {
7
7
TestBed . configureTestingModule ( { < % if ( routing ) { % >
8
8
imports : [
9
9
RouterTestingModule
10
10
] , < % } % >
11
11
declarations : [
12
12
AppComponent
13
13
] ,
14
- } ) ;
15
- TestBed . compileComponents ( ) ;
16
- } ) ;
14
+ } ) . compileComponents ( ) ;
15
+ } ) ) ;
17
16
18
17
it ( 'should create the app' , async ( ( ) => {
19
18
const fixture = TestBed . createComponent ( AppComponent ) ;
Original file line number Diff line number Diff line change @@ -77,17 +77,16 @@ export default function () {
77
77
import { AppComponent } from './app.component';
78
78
79
79
describe('AppComponent', () => {
80
- beforeEach(() => {
80
+ beforeEach(async( () => {
81
81
TestBed.configureTestingModule({
82
82
imports: [
83
83
HttpModule
84
84
],
85
85
declarations: [
86
86
AppComponent
87
- ],
88
- });
89
- TestBed.compileComponents();
90
- });
87
+ ]
88
+ }).compileComponents();
89
+ }));
91
90
92
91
it('should create the app', async(() => {
93
92
const fixture = TestBed.createComponent(AppComponent);
Original file line number Diff line number Diff line change @@ -29,10 +29,11 @@ export default function () {
29
29
import { AppComponent } from './app.component';
30
30
31
31
describe('AppComponent', () => {
32
- beforeEach(() => {
33
- TestBed.configureTestingModule({ declarations: [ AppComponent ] });
34
- TestBed.compileComponents();
35
- });
32
+ beforeEach(async(() => {
33
+ TestBed.configureTestingModule({
34
+ declarations: [ AppComponent ]
35
+ }).compileComponents();
36
+ }));
36
37
37
38
it('should have access to string-script.js', async(() => {
38
39
let app = TestBed.createComponent(AppComponent).debugElement.componentInstance;
You can’t perform that action at this time.
0 commit comments