Skip to content

Commit f463c84

Browse files
committed
fix(@schematics/angular): remove async test helper function from component schematic
1 parent d4198e5 commit f463c84

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/schematics/angular/application/other-files/app.component.spec.ts.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { TestBed, async } from '@angular/core/testing';<% if (routing) { %>
1+
import { TestBed } from '@angular/core/testing';<% if (routing) { %>
22
import { RouterTestingModule } from '@angular/router/testing';<% } %>
33
import { AppComponent } from './app.component';
44

55
describe('AppComponent', () => {
6-
beforeEach(async(() => {
7-
TestBed.configureTestingModule({<% if (routing) { %>
6+
beforeEach(async () => {
7+
await TestBed.configureTestingModule({<% if (routing) { %>
88
imports: [
99
RouterTestingModule
1010
],<% } %>
1111
declarations: [
1212
AppComponent
1313
],
1414
}).compileComponents();
15-
}));
15+
});
1616

1717
it('should create the app', () => {
1818
const fixture = TestBed.createComponent(AppComponent);

packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>';
44

55
describe('<%= classify(name) %><%= classify(type) %>', () => {
66
let component: <%= classify(name) %><%= classify(type) %>;
77
let fixture: ComponentFixture<<%= classify(name) %><%= classify(type) %>>;
88

9-
beforeEach(async(() => {
10-
TestBed.configureTestingModule({
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
1111
declarations: [ <%= classify(name) %><%= classify(type) %> ]
1212
})
1313
.compileComponents();
14-
}));
14+
});
1515

1616
beforeEach(() => {
1717
fixture = TestBed.createComponent(<%= classify(name) %><%= classify(type) %>);

0 commit comments

Comments
 (0)