Skip to content

Commit 4225edd

Browse files
fix(@angular/cli): Do not use floating promises, we can resolve these promises by returning them.
1 parent a7cf22c commit 4225edd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ 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+
return 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ 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+
return 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)