Skip to content

Commit 325c684

Browse files
committed
test: deprecate async() in favour of waitForAsync()
1 parent e5bfd2e commit 325c684

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/app/app.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { RouterTestingModule } from '@angular/router/testing';
2-
import { TestBed, async } from '@angular/core/testing';
2+
import { TestBed, waitForAsync } from '@angular/core/testing';
33
import { AppComponent } from './app.component';
44
describe('AppComponent', () => {
5-
beforeEach(async(() => {
5+
beforeEach(waitForAsync(() => {
66
TestBed.configureTestingModule({
77
declarations: [
88
AppComponent
99
],
1010
imports: [ RouterTestingModule ]
1111
}).compileComponents();
1212
}));
13-
it('should create the app', async(() => {
13+
it('should create the app', waitForAsync(() => {
1414
const fixture = TestBed.createComponent(AppComponent);
1515
const app = fixture.debugElement.componentInstance;
1616
expect(app).toBeTruthy();

src/app/views/base/navbars/navbars.component.spec.ts

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

33
import { NavbarsComponent } from './navbars.component';
44

55
describe('NavbarsComponent', () => {
66
let component: NavbarsComponent;
77
let fixture: ComponentFixture<NavbarsComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ NavbarsComponent ]
1212
})

0 commit comments

Comments
 (0)