Skip to content

Commit 0001c22

Browse files
committed
chore(ng10.1): Refactor 'beforeEach' to use async/await
1 parent 5c14e58 commit 0001c22

File tree

11 files changed

+38
-38
lines changed

11 files changed

+38
-38
lines changed

src/test/components/ng-http-loader.component.on-push.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ describe('NgHttpLoaderComponent OnPush', () => {
2727
let http: HttpClient;
2828
let httpMock: HttpTestingController;
2929

30-
beforeEach(waitForAsync(() => {
31-
TestBed.configureTestingModule({
30+
beforeEach(async () => {
31+
await TestBed.configureTestingModule({
3232
declarations: [HostComponent],
3333
imports: [HttpClientTestingModule, NgHttpLoaderModule.forRoot()]
3434
})
3535
.compileComponents();
36-
}));
36+
});
3737

3838
beforeEach(() => {
3939
fixture = TestBed.createComponent(HostComponent);

src/test/components/ng-http-loader.component.outlet.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ describe('NgHttpLoaderComponentOutlet', () => {
1818
let component: NgHttpLoaderComponent;
1919
let fixture: ComponentFixture<NgHttpLoaderComponent>;
2020

21-
beforeEach(waitForAsync(() => {
22-
TestBed.configureTestingModule({
21+
beforeEach(async () => {
22+
await TestBed.configureTestingModule({
2323
declarations: [NgHttpLoaderComponent, ...SPINKIT_COMPONENTS]
2424
})
2525
.compileComponents();
26-
}));
26+
});
2727

2828
beforeEach(() => {
2929
fixture = TestBed.createComponent(NgHttpLoaderComponent);

src/test/components/ng-http-loader.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ describe('NgHttpLoaderComponent', () => {
2626
let isVisible: boolean;
2727
let isVisibleSubscription: Subscription;
2828

29-
beforeEach(waitForAsync(() => {
30-
TestBed.configureTestingModule({
29+
beforeEach(async () => {
30+
await TestBed.configureTestingModule({
3131
declarations: [NgHttpLoaderComponent, ...SPINKIT_COMPONENTS],
3232
imports: [HttpClientTestingModule],
3333
providers: [PendingRequestsInterceptorProvider]
3434
})
3535
.compileComponents();
36-
}));
36+
});
3737

3838
beforeEach(() => {
3939
fixture = TestBed.createComponent(NgHttpLoaderComponent);

src/test/components/sk-chasing-dots/sk-chasing-dots.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ describe('SkChasingDotsComponent', () => {
1515
let component: SkChasingDotsComponent;
1616
let fixture: ComponentFixture<SkChasingDotsComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkChasingDotsComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkChasingDotsComponent);

src/test/components/sk-cube-grid/sk-cube-grid.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ describe('SkCubeGridComponent', () => {
1515
let component: SkCubeGridComponent;
1616
let fixture: ComponentFixture<SkCubeGridComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkCubeGridComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkCubeGridComponent);

src/test/components/sk-double-bounce/sk-double-bounce.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
*/
99

10-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
10+
import { ComponentFixture, TestBed } from '@angular/core/testing';
1111
import { By } from '@angular/platform-browser';
1212
import { SkDoubleBounceComponent } from '../../../lib/components/sk-double-bounce/sk-double-bounce.component';
1313

1414
describe('SkDoubleBounceComponent', () => {
1515
let component: SkDoubleBounceComponent;
1616
let fixture: ComponentFixture<SkDoubleBounceComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkDoubleBounceComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkDoubleBounceComponent);

src/test/components/sk-rotating-plane/sk-rotating-plane.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
*/
99

10-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
10+
import { ComponentFixture, TestBed } from '@angular/core/testing';
1111
import { By } from '@angular/platform-browser';
1212
import { SkRotatingPlaneComponent } from '../../../lib/components/sk-rotating-plane/sk-rotating-plane.component';
1313

1414
describe('SkRotatingPlaneComponent', () => {
1515
let component: SkRotatingPlaneComponent;
1616
let fixture: ComponentFixture<SkRotatingPlaneComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkRotatingPlaneComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkRotatingPlaneComponent);

src/test/components/sk-spinner-pulse/sk-spinner-pulse.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
*/
99

10-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
10+
import { ComponentFixture, TestBed } from '@angular/core/testing';
1111
import { By } from '@angular/platform-browser';
1212
import { SkSpinnerPulseComponent } from '../../../lib/components/sk-spinner-pulse/sk-spinner-pulse.component';
1313

1414
describe('SkSpinnerPulseComponent', () => {
1515
let component: SkSpinnerPulseComponent;
1616
let fixture: ComponentFixture<SkSpinnerPulseComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkSpinnerPulseComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkSpinnerPulseComponent);

src/test/components/sk-three-bounce/sk-three-bounce.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
88
*/
99

10-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
10+
import { ComponentFixture, TestBed } from '@angular/core/testing';
1111
import { By } from '@angular/platform-browser';
1212
import { SkThreeBounceComponent } from '../../../lib/components/sk-three-bounce/sk-three-bounce.component';
1313

1414
describe('SkThreeBounceComponent', () => {
1515
let component: SkThreeBounceComponent;
1616
let fixture: ComponentFixture<SkThreeBounceComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkThreeBounceComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkThreeBounceComponent);

src/test/components/sk-wandering-cubes/sk-wandering-cubes.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ describe('SkWanderingCubesComponent', () => {
1515
let component: SkWanderingCubesComponent;
1616
let fixture: ComponentFixture<SkWanderingCubesComponent>;
1717

18-
beforeEach(waitForAsync(() => {
19-
TestBed.configureTestingModule({
18+
beforeEach(async () => {
19+
await TestBed.configureTestingModule({
2020
declarations: [SkWanderingCubesComponent]
2121
})
2222
.compileComponents();
23-
}));
23+
});
2424

2525
beforeEach(() => {
2626
fixture = TestBed.createComponent(SkWanderingCubesComponent);

0 commit comments

Comments
 (0)