Skip to content

Commit 8679b01

Browse files
committed
fix: #571 update async for waitForAsync
1 parent 1e3ceea commit 8679b01

File tree

40 files changed

+122
-107
lines changed

40 files changed

+122
-107
lines changed

src/app/app.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { TestBed, async } from '@angular/core/testing';
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
22
import { RouterTestingModule } from '@angular/router/testing';
33
import { AppComponent } from './app.component';
44

55
describe('AppComponent', () => {
6-
beforeEach(async(() => {
6+
beforeEach(waitForAsync(() => {
77
TestBed.configureTestingModule({
88
imports: [
99
RouterTestingModule

src/app/modules/activities-management/components/activity-list/activity-list.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { provideMockStore, MockStore } from '@ngrx/store/testing';
2-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
33

44
import { allActivities } from './../../store/activity-management.selectors';
55
import { ActivityState } from './../../store/activity-management.reducers';
@@ -19,7 +19,7 @@ describe('ActivityListComponent', () => {
1919
activityIdToEdit: '',
2020
};
2121

22-
beforeEach(async(() => {
22+
beforeEach(waitForAsync(() => {
2323
TestBed.configureTestingModule({
2424
declarations: [ActivityListComponent],
2525
providers: [provideMockStore({ initialState: state })],

src/app/modules/activities-management/components/create-activity/create-activity.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FormBuilder } from '@angular/forms';
2-
import { async, TestBed, ComponentFixture } from '@angular/core/testing';
2+
import { waitForAsync, TestBed, ComponentFixture } from '@angular/core/testing';
33
import { provideMockStore, MockStore } from '@ngrx/store/testing';
44

55
import { CreateActivityComponent } from './create-activity.component';
@@ -36,7 +36,7 @@ describe('CreateActivityComponent', () => {
3636
description: 'It is good for learning',
3737
};
3838

39-
beforeEach(async(() => {
39+
beforeEach(waitForAsync(() => {
4040
TestBed.configureTestingModule({
4141
declarations: [CreateActivityComponent],
4242
providers: [FormBuilder, provideMockStore({ initialState: state })],

src/app/modules/activities-management/pages/activities-management.component.spec.ts

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

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

8-
beforeEach(async(() => {
8+
beforeEach(waitForAsync(() => {
99
TestBed.configureTestingModule({
1010
imports: [],
1111
declarations: [ActivitiesManagementComponent]

src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LoadCustomerProjects, CleanCustomerProjects } from './../../../projects/components/store/project.actions';
22
import { LoadProjectTypes, CleanProjectTypes } from './../../../projects-type/store/project-type.actions';
3-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
44
import { FormBuilder } from '@angular/forms';
55
import { MockStore, provideMockStore } from '@ngrx/store/testing';
66

@@ -27,7 +27,7 @@ describe('CreateCustomerComponent', () => {
2727
description: 'bb',
2828
};
2929

30-
beforeEach(async(() => {
30+
beforeEach(waitForAsync(() => {
3131
TestBed.configureTestingModule({
3232
declarations: [CreateCustomerComponent],
3333
providers: [

src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts

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

44
import { NgxPaginationModule } from 'ngx-pagination';
@@ -29,7 +29,7 @@ describe('CustomerTableListComponent', () => {
2929
customerId: '',
3030
};
3131

32-
beforeEach(async(() => {
32+
beforeEach(waitForAsync(() => {
3333
TestBed.configureTestingModule({
3434
imports: [NgxPaginationModule, DataTablesModule],
3535
declarations: [CustomerListComponent],

src/app/modules/customer-management/components/management-customer-projects/management-customer-projects.component.spec.ts

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

33
import { ManagementCustomerProjectsComponent } from './management-customer-projects.component';
44
import { MockStore, provideMockStore } from '@ngrx/store/testing';
@@ -17,7 +17,7 @@ describe('ManagmentCustomerProjectsComponent', () => {
1717
customerId: '',
1818
};
1919

20-
beforeEach(async(() => {
20+
beforeEach(waitForAsync(() => {
2121
TestBed.configureTestingModule({
2222
declarations: [ManagementCustomerProjectsComponent],
2323
providers: [

src/app/modules/customer-management/components/projects-type/components/create-project-type/create-project-type.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22
import { FormBuilder } from '@angular/forms';
33
import { provideMockStore, MockStore } from '@ngrx/store/testing';
44

@@ -38,7 +38,7 @@ describe('InputProjectTypeComponent', () => {
3838
description: 'It is good for learning',
3939
};
4040

41-
beforeEach(async(() => {
41+
beforeEach(waitForAsync(() => {
4242
TestBed.configureTestingModule({
4343
declarations: [CreateProjectTypeComponent],
4444
providers: [FormBuilder, provideMockStore({ initialState: state })],

src/app/modules/customer-management/components/projects-type/components/project-type-list/project-type-list.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22
import { provideMockStore, MockStore } from '@ngrx/store/testing';
33
import { NgxPaginationModule } from 'ngx-pagination';
44

@@ -19,7 +19,7 @@ describe('ProjectTypeTableListComponent', () => {
1919
projectTypeIdToEdit: '',
2020
};
2121

22-
beforeEach(async(() => {
22+
beforeEach(waitForAsync(() => {
2323
TestBed.configureTestingModule({
2424
imports: [NgxPaginationModule],
2525
declarations: [ProjectTypeListComponent],

src/app/modules/customer-management/components/projects/components/create-project/create-project.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
22
import { MockStore, provideMockStore } from '@ngrx/store/testing';
33
import { FormBuilder } from '@angular/forms';
44
import { Subscription } from 'rxjs';
@@ -35,7 +35,7 @@ describe('InputProjectComponent', () => {
3535
project_type_id: '123',
3636
};
3737

38-
beforeEach(async(() => {
38+
beforeEach(waitForAsync(() => {
3939
TestBed.configureTestingModule({
4040
declarations: [CreateProjectComponent],
4141
providers: [FormBuilder, provideMockStore({ initialState: state })],

0 commit comments

Comments
 (0)