Skip to content

Commit a97ccba

Browse files
alan-agius4hansl
authored andcommitted
style: remove redundant async in tests
In component specs only the `compileComponents` is async thus the `async` on `it` are redudnant Closes #12161
1 parent f28cd7c commit a97ccba

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TestBed, async } from '@angular/core/testing';<% if (routing) { %>
22
import { RouterTestingModule } from '@angular/router/testing';<% } %>
33
import { AppComponent } from './app.component';
4-
4+
55
describe('AppComponent', () => {
66
beforeEach(async(() => {
77
TestBed.configureTestingModule({<% if (routing) { %>
@@ -14,22 +14,22 @@ describe('AppComponent', () => {
1414
}).compileComponents();
1515
}));
1616

17-
it('should create the app', async(() => {
17+
it('should create the app', () => {
1818
const fixture = TestBed.createComponent(AppComponent);
1919
const app = fixture.debugElement.componentInstance;
2020
expect(app).toBeTruthy();
21-
}));
21+
});
2222

23-
it(`should have as title '<%= name %>'`, async(() => {
23+
it(`should have as title '<%= name %>'`, () => {
2424
const fixture = TestBed.createComponent(AppComponent);
2525
const app = fixture.debugElement.componentInstance;
2626
expect(app.title).toEqual('<%= name %>');
27-
}));
27+
});
2828

29-
it('should render title in a h1 tag', async(() => {
29+
it('should render title in a h1 tag', () => {
3030
const fixture = TestBed.createComponent(AppComponent);
3131
fixture.detectChanges();
3232
const compiled = fixture.debugElement.nativeElement;
3333
expect(compiled.querySelector('h1').textContent).toContain('Welcome to <%= name %>!');
34-
}));
34+
});
3535
});

0 commit comments

Comments
 (0)