From ee9a2ea8b0e8d3f6f6a9c7e31f85e486307566e6 Mon Sep 17 00:00:00 2001 From: Sumanth Chinthagunta Date: Sun, 25 Oct 2020 20:51:15 -0700 Subject: [PATCH] fix(lint): fix lint issues --- apps/webapp/src/app/app.component.spec.ts | 24 +-- libs/admin/src/lib/admin.module.spec.ts | 14 +- .../notification-detail.component.spec.ts | 14 +- .../notification-edit.component.spec.ts | 14 +- .../subscription-detail.component.spec.ts | 14 +- .../admin-layout.component.spec.ts | 14 +- .../notifications.component.spec.ts | 14 +- .../overview/overview.component.spec.ts | 14 +- .../subscriptions.component.spec.ts | 14 +- .../src/lib/app-confirm.component.spec.ts | 14 +- .../src/lib/app-confirm.module.spec.ts | 14 +- libs/auth/src/lib/auth.state.spec.ts | 16 +- .../components/login/login.component.spec.ts | 14 +- .../src/lib/chat-box.component.spec.ts | 14 +- libs/chat-box/src/lib/chat-box.module.spec.ts | 14 +- .../chat-card/chat-card.component.spec.ts | 14 +- ...xt-to-speech-preferences.component.spec.ts | 14 +- .../typing-indicator.component.spec.ts | 14 +- .../src/lib/context-menu.component.spec.ts | 14 +- .../src/lib/context-menu.module.spec.ts | 14 +- libs/core/src/lib/core.module.spec.ts | 14 +- libs/core/src/lib/state/profile.state.spec.ts | 16 +- .../app-profile/app-profile.component.spec.ts | 14 +- .../rainbow/rainbow.component.spec.ts | 15 +- .../dashboard-layout.component.spec.ts | 15 +- .../overview/overview.component.spec.ts | 14 +- .../profile/profile.component.spec.ts | 14 +- .../settings/settings.component.spec.ts | 14 +- .../src/lib/dashboard.module.spec.ts | 14 +- .../src/lib/draggable.module.spec.ts | 14 +- .../components/card/card.component.spec.ts | 14 +- .../animations/animations.component.spec.ts | 14 +- .../context-menu.component.spec.ts | 14 +- .../dashing/dashing.component.spec.ts | 14 +- .../file-upload/file-upload.component.spec.ts | 14 +- .../image-comp/image-comp.component.spec.ts | 14 +- .../knob-demo/knob-demo.component.spec.ts | 14 +- .../layout/layout.component.spec.ts | 14 +- .../led-demo/led-demo.component.spec.ts | 14 +- .../sticky-table.component.spec.ts | 14 +- .../virtual-scroll.component.spec.ts | 14 +- .../src/lib/experiments.module.spec.ts | 14 +- .../account-detail.component.spec.ts | 14 +- .../account-edit.component.spec.ts | 14 +- .../accounts-grid-list.component.spec.ts | 14 +- .../accounts-table.component.spec.ts | 14 +- libs/grid/src/lib/grid.module.spec.ts | 14 +- .../footer/footer.component.spec.ts | 14 +- .../header/header.component.spec.ts | 16 +- .../containers/about/about.component.spec.ts | 14 +- .../containers/blog/blog.component.spec.ts | 14 +- .../features/features.component.spec.ts | 16 +- .../home-layout/home-layout.component.spec.ts | 16 +- .../landing/landing.component.spec.ts | 16 +- libs/home/src/lib/home.module.spec.ts | 14 +- .../lib/image-comparison.component.spec.ts | 14 +- .../src/lib/json-diff-tree.component.spec.ts | 14 +- .../src/lib/json-diff.component.spec.ts | 14 +- libs/led/src/lib/led.component.spec.ts | 14 +- .../src/lib/loading-overlay.component.spec.ts | 14 +- .../src/lib/navigator.module.spec.ts | 14 +- .../ng-let/ng-let.directive.spec.ts | 148 ++++++++++-------- .../not-found/not-found.component.spec.ts | 14 +- .../src/lib/not-found.module.spec.ts | 14 +- .../src/lib/notifications.component.spec.ts | 14 +- .../src/lib/notifications.module.spec.ts | 14 +- .../src/lib/quickpanel.component.spec.ts | 14 +- .../src/lib/scroll-to-top.component.spec.ts | 24 +-- .../src/lib/scroll-to-top.module.spec.ts | 16 +- .../entity/entity-form.component.ts | 1 + .../entity/entity.component.spec.ts | 14 +- libs/shared/src/lib/shared.module.spec.ts | 14 +- .../menu-item/menu-item.component.spec.ts | 14 +- .../sidenav-item.component.spec.ts | 14 +- .../sidenav/src/lib/sidenav.component.spec.ts | 14 +- .../src/lib/svg-viewer.component.spec.ts | 14 +- .../src/lib/theme-picker.component.spec.ts | 14 +- .../fullscreen-toggle.component.spec.ts | 14 +- .../quickpanel-toggle.component.spec.ts | 14 +- .../search-bar/search-bar.component.spec.ts | 14 +- .../search/search.component.spec.ts | 14 +- .../sidenav-toggle.component.spec.ts | 14 +- .../user-menu/user-menu.component.spec.ts | 14 +- .../toolbar/src/lib/toolbar.component.spec.ts | 14 +- .../components/list/list.component.spec.ts | 14 +- .../wizdash/wizdash.component.spec.ts | 15 +- libs/widgets/src/lib/widgets.module.spec.ts | 14 +- package.json | 6 +- 88 files changed, 784 insertions(+), 598 deletions(-) diff --git a/apps/webapp/src/app/app.component.spec.ts b/apps/webapp/src/app/app.component.spec.ts index 1fa34882a..140e2e2b2 100644 --- a/apps/webapp/src/app/app.component.spec.ts +++ b/apps/webapp/src/app/app.component.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, async, ComponentFixture } from '@angular/core/testing'; +import { TestBed, waitForAsync, ComponentFixture } from '@angular/core/testing'; import { AppComponent } from './app.component'; import { RouterTestingModule } from '@angular/router/testing'; import { ServiceWorkerModule } from '@angular/service-worker'; @@ -7,18 +7,20 @@ describe('AppComponent', () => { let component: AppComponent; let fixture: ComponentFixture; - beforeEach(async(async () => { - await TestBed.configureTestingModule({ - imports: [RouterTestingModule, ServiceWorkerModule.register('', { enabled: false })], - declarations: [AppComponent], - }).compileComponents(); + beforeEach( + waitForAsync(async () => { + await TestBed.configureTestingModule({ + imports: [RouterTestingModule, ServiceWorkerModule.register('', { enabled: false })], + declarations: [AppComponent], + }).compileComponents(); - // create component and test fixture - fixture = TestBed.createComponent(AppComponent); + // create component and test fixture + fixture = TestBed.createComponent(AppComponent); - // get test component from the fixture - component = fixture.debugElement.componentInstance; - })); + // get test component from the fixture + component = fixture.debugElement.componentInstance; + }) + ); it('should create the webapp', async(() => { expect(component).toBeTruthy(); diff --git a/libs/admin/src/lib/admin.module.spec.ts b/libs/admin/src/lib/admin.module.spec.ts index 7d56887b1..ff0037b0c 100644 --- a/libs/admin/src/lib/admin.module.spec.ts +++ b/libs/admin/src/lib/admin.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { AdminModule } from './admin.module'; describe('AdminModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [AdminModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [AdminModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(AdminModule).toBeDefined(); diff --git a/libs/admin/src/lib/components/notification-detail/notification-detail.component.spec.ts b/libs/admin/src/lib/components/notification-detail/notification-detail.component.spec.ts index 7cab71d38..8d92dce12 100644 --- a/libs/admin/src/lib/components/notification-detail/notification-detail.component.spec.ts +++ b/libs/admin/src/lib/components/notification-detail/notification-detail.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NotificationDetailComponent } from './notification-detail.component'; @@ -6,11 +6,13 @@ describe('NotificationDetailComponent', () => { let component: NotificationDetailComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NotificationDetailComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NotificationDetailComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(NotificationDetailComponent); diff --git a/libs/admin/src/lib/components/notification-edit/notification-edit.component.spec.ts b/libs/admin/src/lib/components/notification-edit/notification-edit.component.spec.ts index 09672faf8..4864beaea 100644 --- a/libs/admin/src/lib/components/notification-edit/notification-edit.component.spec.ts +++ b/libs/admin/src/lib/components/notification-edit/notification-edit.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NotificationEditComponent } from './notification-edit.component'; @@ -6,11 +6,13 @@ describe('NotificationEditComponent', () => { let component: NotificationEditComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NotificationEditComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NotificationEditComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(NotificationEditComponent); diff --git a/libs/admin/src/lib/components/subscription-detail/subscription-detail.component.spec.ts b/libs/admin/src/lib/components/subscription-detail/subscription-detail.component.spec.ts index 8ac54f2f3..dd5c1475d 100644 --- a/libs/admin/src/lib/components/subscription-detail/subscription-detail.component.spec.ts +++ b/libs/admin/src/lib/components/subscription-detail/subscription-detail.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SubscriptionDetailComponent } from './subscription-detail.component'; @@ -6,11 +6,13 @@ describe('SubscriptionDetailComponent', () => { let component: SubscriptionDetailComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SubscriptionDetailComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SubscriptionDetailComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SubscriptionDetailComponent); diff --git a/libs/admin/src/lib/containers/admin-layout/admin-layout.component.spec.ts b/libs/admin/src/lib/containers/admin-layout/admin-layout.component.spec.ts index 0bd07083c..1778c76f8 100644 --- a/libs/admin/src/lib/containers/admin-layout/admin-layout.component.spec.ts +++ b/libs/admin/src/lib/containers/admin-layout/admin-layout.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AdminLayoutComponent } from './admin-layout.component'; @@ -6,11 +6,13 @@ describe('AdminLayoutComponent', () => { let component: AdminLayoutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AdminLayoutComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AdminLayoutComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AdminLayoutComponent); diff --git a/libs/admin/src/lib/containers/notifications/notifications.component.spec.ts b/libs/admin/src/lib/containers/notifications/notifications.component.spec.ts index 5970f6de6..1805fa640 100644 --- a/libs/admin/src/lib/containers/notifications/notifications.component.spec.ts +++ b/libs/admin/src/lib/containers/notifications/notifications.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NotificationsComponent } from './notifications.component'; @@ -6,11 +6,13 @@ describe('NotificationsComponent', () => { let component: NotificationsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NotificationsComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NotificationsComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(NotificationsComponent); diff --git a/libs/admin/src/lib/containers/overview/overview.component.spec.ts b/libs/admin/src/lib/containers/overview/overview.component.spec.ts index 4f21e928d..80a4aaf4d 100644 --- a/libs/admin/src/lib/containers/overview/overview.component.spec.ts +++ b/libs/admin/src/lib/containers/overview/overview.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { OverviewComponent } from './overview.component'; @@ -6,11 +6,13 @@ describe('OverviewComponent', () => { let component: OverviewComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [OverviewComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [OverviewComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(OverviewComponent); diff --git a/libs/admin/src/lib/containers/subscriptions/subscriptions.component.spec.ts b/libs/admin/src/lib/containers/subscriptions/subscriptions.component.spec.ts index 6894ceb70..80c85b719 100644 --- a/libs/admin/src/lib/containers/subscriptions/subscriptions.component.spec.ts +++ b/libs/admin/src/lib/containers/subscriptions/subscriptions.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SubscriptionsComponent } from './subscriptions.component'; @@ -6,11 +6,13 @@ describe('SubscriptionsComponent', () => { let component: SubscriptionsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SubscriptionsComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SubscriptionsComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SubscriptionsComponent); diff --git a/libs/app-confirm/src/lib/app-confirm.component.spec.ts b/libs/app-confirm/src/lib/app-confirm.component.spec.ts index ade0b917e..b76ead402 100644 --- a/libs/app-confirm/src/lib/app-confirm.component.spec.ts +++ b/libs/app-confirm/src/lib/app-confirm.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AppConfirmComponent } from './app-confirm.component'; @@ -6,11 +6,13 @@ describe('AppConfirmComponent', () => { let component: AppConfirmComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AppConfirmComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AppConfirmComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AppConfirmComponent); diff --git a/libs/app-confirm/src/lib/app-confirm.module.spec.ts b/libs/app-confirm/src/lib/app-confirm.module.spec.ts index 8639c2feb..ffcd459ad 100644 --- a/libs/app-confirm/src/lib/app-confirm.module.spec.ts +++ b/libs/app-confirm/src/lib/app-confirm.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { AppConfirmModule } from './app-confirm.module'; describe('AppConfirmModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [AppConfirmModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [AppConfirmModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(AppConfirmModule).toBeDefined(); diff --git a/libs/auth/src/lib/auth.state.spec.ts b/libs/auth/src/lib/auth.state.spec.ts index 8882e554b..324cb649f 100644 --- a/libs/auth/src/lib/auth.state.spec.ts +++ b/libs/auth/src/lib/auth.state.spec.ts @@ -1,4 +1,4 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { NgxsModule, Store } from '@ngxs/store'; import { LogoutSuccess } from './auth.actions'; import { AuthState } from './auth.state'; @@ -6,12 +6,14 @@ import { AuthState } from './auth.state'; describe('Auth', () => { let store: Store; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [NgxsModule.forRoot([AuthState])], - }).compileComponents(); - store = TestBed.inject(Store); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [NgxsModule.forRoot([AuthState])], + }).compileComponents(); + store = TestBed.inject(Store); + }) + ); it('it toggles feed', () => { store.dispatch(new LogoutSuccess()); diff --git a/libs/auth/src/lib/components/login/login.component.spec.ts b/libs/auth/src/lib/components/login/login.component.spec.ts index 3eb0bcf81..201aa2f71 100644 --- a/libs/auth/src/lib/components/login/login.component.spec.ts +++ b/libs/auth/src/lib/components/login/login.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LoginComponent } from './login.component'; @@ -6,11 +6,13 @@ describe('LoginComponent', () => { let component: LoginComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [LoginComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LoginComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LoginComponent); diff --git a/libs/chat-box/src/lib/chat-box.component.spec.ts b/libs/chat-box/src/lib/chat-box.component.spec.ts index 862837e15..107a955fd 100644 --- a/libs/chat-box/src/lib/chat-box.component.spec.ts +++ b/libs/chat-box/src/lib/chat-box.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ChatBoxComponent } from './chat-box.component'; @@ -6,11 +6,13 @@ describe('ChatBoxComponent', () => { let component: ChatBoxComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ChatBoxComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ChatBoxComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ChatBoxComponent); diff --git a/libs/chat-box/src/lib/chat-box.module.spec.ts b/libs/chat-box/src/lib/chat-box.module.spec.ts index 46744f019..3f57359bc 100644 --- a/libs/chat-box/src/lib/chat-box.module.spec.ts +++ b/libs/chat-box/src/lib/chat-box.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { ChatBoxModule } from './chat-box.module'; describe('ChatBoxModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ChatBoxModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ChatBoxModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(ChatBoxModule).toBeDefined(); diff --git a/libs/chat-box/src/lib/components/chat-card/chat-card.component.spec.ts b/libs/chat-box/src/lib/components/chat-card/chat-card.component.spec.ts index 3e6cdc823..b6fbedd9c 100644 --- a/libs/chat-box/src/lib/components/chat-card/chat-card.component.spec.ts +++ b/libs/chat-box/src/lib/components/chat-card/chat-card.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ChatCardComponent } from './chat-card.component'; @@ -6,11 +6,13 @@ describe('ChatCardComponent', () => { let component: ChatCardComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ChatCardComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ChatCardComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ChatCardComponent); diff --git a/libs/chat-box/src/lib/components/text-to-speech-preferences/text-to-speech-preferences.component.spec.ts b/libs/chat-box/src/lib/components/text-to-speech-preferences/text-to-speech-preferences.component.spec.ts index 97705f65a..4d785cacc 100644 --- a/libs/chat-box/src/lib/components/text-to-speech-preferences/text-to-speech-preferences.component.spec.ts +++ b/libs/chat-box/src/lib/components/text-to-speech-preferences/text-to-speech-preferences.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { TextToSpeechPreferencesComponent } from './text-to-speech-preferences.component'; @@ -6,11 +6,13 @@ describe('TextToSpeechPreferencesComponent', () => { let component: TextToSpeechPreferencesComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [TextToSpeechPreferencesComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TextToSpeechPreferencesComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(TextToSpeechPreferencesComponent); diff --git a/libs/chat-box/src/lib/components/typing-indicator/typing-indicator.component.spec.ts b/libs/chat-box/src/lib/components/typing-indicator/typing-indicator.component.spec.ts index 2ae514423..ec9780060 100644 --- a/libs/chat-box/src/lib/components/typing-indicator/typing-indicator.component.spec.ts +++ b/libs/chat-box/src/lib/components/typing-indicator/typing-indicator.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { TypingIndicatorComponent } from './typing-indicator.component'; @@ -6,11 +6,13 @@ describe('TypingIndicatorComponent', () => { let component: TypingIndicatorComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [TypingIndicatorComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [TypingIndicatorComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(TypingIndicatorComponent); diff --git a/libs/context-menu/src/lib/context-menu.component.spec.ts b/libs/context-menu/src/lib/context-menu.component.spec.ts index e221dee3f..c2a11ccf8 100644 --- a/libs/context-menu/src/lib/context-menu.component.spec.ts +++ b/libs/context-menu/src/lib/context-menu.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ContextMenuComponent } from './context-menu.component'; @@ -6,11 +6,13 @@ describe('ContextMenuComponent', () => { let component: ContextMenuComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ContextMenuComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ContextMenuComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ContextMenuComponent); diff --git a/libs/context-menu/src/lib/context-menu.module.spec.ts b/libs/context-menu/src/lib/context-menu.module.spec.ts index 3bd6c322d..5587f6dc9 100644 --- a/libs/context-menu/src/lib/context-menu.module.spec.ts +++ b/libs/context-menu/src/lib/context-menu.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { ContextMenuModule } from './context-menu.module'; describe('ContextMenuModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ContextMenuModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ContextMenuModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(ContextMenuModule).toBeDefined(); diff --git a/libs/core/src/lib/core.module.spec.ts b/libs/core/src/lib/core.module.spec.ts index 523efe937..058170f33 100644 --- a/libs/core/src/lib/core.module.spec.ts +++ b/libs/core/src/lib/core.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { CoreModule } from './core.module'; describe('CoreModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [CoreModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [CoreModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(CoreModule).toBeDefined(); diff --git a/libs/core/src/lib/state/profile.state.spec.ts b/libs/core/src/lib/state/profile.state.spec.ts index 9d1df31b6..a0eb19126 100644 --- a/libs/core/src/lib/state/profile.state.spec.ts +++ b/libs/core/src/lib/state/profile.state.spec.ts @@ -1,15 +1,17 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { NgxsModule, Store } from '@ngxs/store'; import { ProfileState, ProfileStateModel } from './profile.state'; describe('Profile state', () => { let store: Store; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [NgxsModule.forRoot([ProfileState])], - }).compileComponents(); - store = TestBed.inject(Store); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [NgxsModule.forRoot([ProfileState])], + }).compileComponents(); + store = TestBed.inject(Store); + }) + ); it('should create an empty state', () => { const actual = store.selectSnapshot(ProfileState.getState); diff --git a/libs/dashboard/src/lib/components/app-profile/app-profile.component.spec.ts b/libs/dashboard/src/lib/components/app-profile/app-profile.component.spec.ts index 1f101d7a7..c815d38cc 100644 --- a/libs/dashboard/src/lib/components/app-profile/app-profile.component.spec.ts +++ b/libs/dashboard/src/lib/components/app-profile/app-profile.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AppProfileComponent } from './app-profile.component'; @@ -6,11 +6,13 @@ describe('AppProfileComponent', () => { let component: AppProfileComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AppProfileComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AppProfileComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AppProfileComponent); diff --git a/libs/dashboard/src/lib/components/rainbow/rainbow.component.spec.ts b/libs/dashboard/src/lib/components/rainbow/rainbow.component.spec.ts index 74baeb659..ffbe62bf7 100644 --- a/libs/dashboard/src/lib/components/rainbow/rainbow.component.spec.ts +++ b/libs/dashboard/src/lib/components/rainbow/rainbow.component.spec.ts @@ -1,16 +1,17 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { RainbowComponent } from './rainbow.component'; describe('RainbowComponent', () => { let component: RainbowComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [RainbowComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [RainbowComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(RainbowComponent); diff --git a/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.spec.ts b/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.spec.ts index 6244fe184..73967c6d1 100644 --- a/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.spec.ts +++ b/libs/dashboard/src/lib/containers/dashboard-layout/dashboard-layout.component.spec.ts @@ -1,16 +1,17 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DashboardLayoutComponent } from './dashboard-layout.component'; describe('AdminLayoutComponent', () => { let component: DashboardLayoutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [DashboardLayoutComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DashboardLayoutComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(DashboardLayoutComponent); diff --git a/libs/dashboard/src/lib/containers/overview/overview.component.spec.ts b/libs/dashboard/src/lib/containers/overview/overview.component.spec.ts index 4f21e928d..80a4aaf4d 100644 --- a/libs/dashboard/src/lib/containers/overview/overview.component.spec.ts +++ b/libs/dashboard/src/lib/containers/overview/overview.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { OverviewComponent } from './overview.component'; @@ -6,11 +6,13 @@ describe('OverviewComponent', () => { let component: OverviewComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [OverviewComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [OverviewComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(OverviewComponent); diff --git a/libs/dashboard/src/lib/containers/profile/profile.component.spec.ts b/libs/dashboard/src/lib/containers/profile/profile.component.spec.ts index e9381c2d6..92c668974 100644 --- a/libs/dashboard/src/lib/containers/profile/profile.component.spec.ts +++ b/libs/dashboard/src/lib/containers/profile/profile.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ProfileComponent } from './profile.component'; @@ -6,11 +6,13 @@ describe('ProfileComponent', () => { let component: ProfileComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ProfileComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ProfileComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ProfileComponent); diff --git a/libs/dashboard/src/lib/containers/settings/settings.component.spec.ts b/libs/dashboard/src/lib/containers/settings/settings.component.spec.ts index 007e15644..9f0a0d54b 100644 --- a/libs/dashboard/src/lib/containers/settings/settings.component.spec.ts +++ b/libs/dashboard/src/lib/containers/settings/settings.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SettingsComponent } from './settings.component'; @@ -6,11 +6,13 @@ describe('SettingsComponent', () => { let component: SettingsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SettingsComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SettingsComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SettingsComponent); diff --git a/libs/dashboard/src/lib/dashboard.module.spec.ts b/libs/dashboard/src/lib/dashboard.module.spec.ts index 9d1916312..05966328e 100644 --- a/libs/dashboard/src/lib/dashboard.module.spec.ts +++ b/libs/dashboard/src/lib/dashboard.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { DashboardModule } from './dashboard.module'; describe('DashboardModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [DashboardModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [DashboardModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(DashboardModule).toBeDefined(); diff --git a/libs/draggable/src/lib/draggable.module.spec.ts b/libs/draggable/src/lib/draggable.module.spec.ts index e4bae0666..477755088 100644 --- a/libs/draggable/src/lib/draggable.module.spec.ts +++ b/libs/draggable/src/lib/draggable.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { DraggableModule } from './draggable.module'; describe('DraggableModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [DraggableModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [DraggableModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(DraggableModule).toBeDefined(); diff --git a/libs/experiments/src/lib/components/card/card.component.spec.ts b/libs/experiments/src/lib/components/card/card.component.spec.ts index 11112728b..a20df3206 100644 --- a/libs/experiments/src/lib/components/card/card.component.spec.ts +++ b/libs/experiments/src/lib/components/card/card.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { CardComponent } from './card.component'; @@ -6,11 +6,13 @@ describe('CardComponent', () => { let component: CardComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [CardComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [CardComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(CardComponent); diff --git a/libs/experiments/src/lib/containers/animations/animations.component.spec.ts b/libs/experiments/src/lib/containers/animations/animations.component.spec.ts index 230fefc43..c003fbc2f 100644 --- a/libs/experiments/src/lib/containers/animations/animations.component.spec.ts +++ b/libs/experiments/src/lib/containers/animations/animations.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AnimationsComponent } from './animations.component'; @@ -6,11 +6,13 @@ describe('AnimationsComponent', () => { let component: AnimationsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AnimationsComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AnimationsComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AnimationsComponent); diff --git a/libs/experiments/src/lib/containers/context-menu/context-menu.component.spec.ts b/libs/experiments/src/lib/containers/context-menu/context-menu.component.spec.ts index e221dee3f..c2a11ccf8 100644 --- a/libs/experiments/src/lib/containers/context-menu/context-menu.component.spec.ts +++ b/libs/experiments/src/lib/containers/context-menu/context-menu.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ContextMenuComponent } from './context-menu.component'; @@ -6,11 +6,13 @@ describe('ContextMenuComponent', () => { let component: ContextMenuComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ContextMenuComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ContextMenuComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ContextMenuComponent); diff --git a/libs/experiments/src/lib/containers/dashing/dashing.component.spec.ts b/libs/experiments/src/lib/containers/dashing/dashing.component.spec.ts index b16d47648..74e3bc656 100644 --- a/libs/experiments/src/lib/containers/dashing/dashing.component.spec.ts +++ b/libs/experiments/src/lib/containers/dashing/dashing.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { DashingComponent } from './dashing.component'; @@ -6,11 +6,13 @@ describe('DashingComponent', () => { let component: DashingComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [DashingComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [DashingComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(DashingComponent); diff --git a/libs/experiments/src/lib/containers/file-upload/file-upload.component.spec.ts b/libs/experiments/src/lib/containers/file-upload/file-upload.component.spec.ts index 8c98e28b4..d7fc378a7 100644 --- a/libs/experiments/src/lib/containers/file-upload/file-upload.component.spec.ts +++ b/libs/experiments/src/lib/containers/file-upload/file-upload.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { FileUploadComponent } from './file-upload.component'; @@ -6,11 +6,13 @@ describe('FileUploadComponent', () => { let component: FileUploadComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [FileUploadComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [FileUploadComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(FileUploadComponent); diff --git a/libs/experiments/src/lib/containers/image-comp/image-comp.component.spec.ts b/libs/experiments/src/lib/containers/image-comp/image-comp.component.spec.ts index 9c63d679d..313523b2c 100644 --- a/libs/experiments/src/lib/containers/image-comp/image-comp.component.spec.ts +++ b/libs/experiments/src/lib/containers/image-comp/image-comp.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ImageCompComponent } from './image-comp.component'; @@ -6,11 +6,13 @@ describe('ImageCompComponent', () => { let component: ImageCompComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ImageCompComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ImageCompComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ImageCompComponent); diff --git a/libs/experiments/src/lib/containers/knob-demo/knob-demo.component.spec.ts b/libs/experiments/src/lib/containers/knob-demo/knob-demo.component.spec.ts index 55b34c99d..e545eac81 100644 --- a/libs/experiments/src/lib/containers/knob-demo/knob-demo.component.spec.ts +++ b/libs/experiments/src/lib/containers/knob-demo/knob-demo.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { KnobDemoComponent } from './knob-demo.component'; @@ -6,11 +6,13 @@ describe('KnobDemoComponent', () => { let component: KnobDemoComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [KnobDemoComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [KnobDemoComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(KnobDemoComponent); diff --git a/libs/experiments/src/lib/containers/layout/layout.component.spec.ts b/libs/experiments/src/lib/containers/layout/layout.component.spec.ts index f9afb632a..ee2a708ae 100644 --- a/libs/experiments/src/lib/containers/layout/layout.component.spec.ts +++ b/libs/experiments/src/lib/containers/layout/layout.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LayoutComponent } from './layout.component'; @@ -6,11 +6,13 @@ describe('LayoutComponent', () => { let component: LayoutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [LayoutComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LayoutComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LayoutComponent); diff --git a/libs/experiments/src/lib/containers/led-demo/led-demo.component.spec.ts b/libs/experiments/src/lib/containers/led-demo/led-demo.component.spec.ts index 29fa4e9bc..531569d8a 100644 --- a/libs/experiments/src/lib/containers/led-demo/led-demo.component.spec.ts +++ b/libs/experiments/src/lib/containers/led-demo/led-demo.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LedDemoComponent } from './led-demo.component'; @@ -6,11 +6,13 @@ describe('LedDemoComponent', () => { let component: LedDemoComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [LedDemoComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LedDemoComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LedDemoComponent); diff --git a/libs/experiments/src/lib/containers/sticky-table/sticky-table.component.spec.ts b/libs/experiments/src/lib/containers/sticky-table/sticky-table.component.spec.ts index e90ef15e0..89bdb9dd1 100644 --- a/libs/experiments/src/lib/containers/sticky-table/sticky-table.component.spec.ts +++ b/libs/experiments/src/lib/containers/sticky-table/sticky-table.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { StickyTableComponent } from './sticky-table.component'; @@ -6,11 +6,13 @@ describe('StickyTableComponent', () => { let component: StickyTableComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [StickyTableComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [StickyTableComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(StickyTableComponent); diff --git a/libs/experiments/src/lib/containers/virtual-scroll/virtual-scroll.component.spec.ts b/libs/experiments/src/lib/containers/virtual-scroll/virtual-scroll.component.spec.ts index 6b80e384e..b500841b4 100644 --- a/libs/experiments/src/lib/containers/virtual-scroll/virtual-scroll.component.spec.ts +++ b/libs/experiments/src/lib/containers/virtual-scroll/virtual-scroll.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { VirtualScrollComponent } from './virtual-scroll.component'; @@ -6,11 +6,13 @@ describe('VirtualScrollComponent', () => { let component: VirtualScrollComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [VirtualScrollComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [VirtualScrollComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(VirtualScrollComponent); diff --git a/libs/experiments/src/lib/experiments.module.spec.ts b/libs/experiments/src/lib/experiments.module.spec.ts index bcef8e7bc..2439bb8fe 100644 --- a/libs/experiments/src/lib/experiments.module.spec.ts +++ b/libs/experiments/src/lib/experiments.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { ExperimentsModule } from './experiments.module'; describe('ExperimentsModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ExperimentsModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ExperimentsModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(ExperimentsModule).toBeDefined(); diff --git a/libs/grid/src/lib/components/account-detail/account-detail.component.spec.ts b/libs/grid/src/lib/components/account-detail/account-detail.component.spec.ts index e14d19612..f1b5d5066 100644 --- a/libs/grid/src/lib/components/account-detail/account-detail.component.spec.ts +++ b/libs/grid/src/lib/components/account-detail/account-detail.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AccountDetailComponent } from './account-detail.component'; @@ -6,11 +6,13 @@ describe('AccountDetailComponent', () => { let component: AccountDetailComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AccountDetailComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AccountDetailComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AccountDetailComponent); diff --git a/libs/grid/src/lib/components/account-edit/account-edit.component.spec.ts b/libs/grid/src/lib/components/account-edit/account-edit.component.spec.ts index 0d291651b..bd26e93a6 100644 --- a/libs/grid/src/lib/components/account-edit/account-edit.component.spec.ts +++ b/libs/grid/src/lib/components/account-edit/account-edit.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AccountEditComponent } from './account-edit.component'; @@ -6,11 +6,13 @@ describe('AccountEditComponent', () => { let component: AccountEditComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AccountEditComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AccountEditComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AccountEditComponent); diff --git a/libs/grid/src/lib/containers/accounts-grid-list/accounts-grid-list.component.spec.ts b/libs/grid/src/lib/containers/accounts-grid-list/accounts-grid-list.component.spec.ts index 27e52f1ff..bf7e31d56 100644 --- a/libs/grid/src/lib/containers/accounts-grid-list/accounts-grid-list.component.spec.ts +++ b/libs/grid/src/lib/containers/accounts-grid-list/accounts-grid-list.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AccountsGridListComponent } from './accounts-grid-list.component'; @@ -6,11 +6,13 @@ describe('AccountsGridListComponent', () => { let component: AccountsGridListComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AccountsGridListComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AccountsGridListComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AccountsGridListComponent); diff --git a/libs/grid/src/lib/containers/accounts-table/accounts-table.component.spec.ts b/libs/grid/src/lib/containers/accounts-table/accounts-table.component.spec.ts index 414d5e6ca..36f21aa79 100644 --- a/libs/grid/src/lib/containers/accounts-table/accounts-table.component.spec.ts +++ b/libs/grid/src/lib/containers/accounts-table/accounts-table.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AccountsTableComponent } from './accounts-table.component'; @@ -6,11 +6,13 @@ describe('AccountsTableComponent', () => { let component: AccountsTableComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AccountsTableComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AccountsTableComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AccountsTableComponent); diff --git a/libs/grid/src/lib/grid.module.spec.ts b/libs/grid/src/lib/grid.module.spec.ts index 9417f1ee1..dd2a5120c 100644 --- a/libs/grid/src/lib/grid.module.spec.ts +++ b/libs/grid/src/lib/grid.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { GridModule } from './grid.module'; describe('GridModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [GridModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [GridModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(GridModule).toBeDefined(); diff --git a/libs/home/src/lib/components/footer/footer.component.spec.ts b/libs/home/src/lib/components/footer/footer.component.spec.ts index 163f646eb..97319a9e4 100644 --- a/libs/home/src/lib/components/footer/footer.component.spec.ts +++ b/libs/home/src/lib/components/footer/footer.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { FooterComponent } from './footer.component'; @@ -6,11 +6,13 @@ describe('FooterComponent', () => { let component: FooterComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [FooterComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [FooterComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(FooterComponent); diff --git a/libs/home/src/lib/components/header/header.component.spec.ts b/libs/home/src/lib/components/header/header.component.spec.ts index d9174dc2f..323f00e20 100644 --- a/libs/home/src/lib/components/header/header.component.spec.ts +++ b/libs/home/src/lib/components/header/header.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { HeaderComponent } from './header.component'; import { SharedModule } from '@ngx-starter-kit/shared'; @@ -10,12 +10,14 @@ describe('HeaderComponent', () => { let component: HeaderComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [SharedModule, CoreModule, ThemePickerModule, RouterTestingModule], - declarations: [HeaderComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [SharedModule, CoreModule, ThemePickerModule, RouterTestingModule], + declarations: [HeaderComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(HeaderComponent); diff --git a/libs/home/src/lib/containers/about/about.component.spec.ts b/libs/home/src/lib/containers/about/about.component.spec.ts index 190d37a26..9a8017545 100644 --- a/libs/home/src/lib/containers/about/about.component.spec.ts +++ b/libs/home/src/lib/containers/about/about.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AboutComponent } from './about.component'; @@ -6,11 +6,13 @@ describe('AboutComponent', () => { let component: AboutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [AboutComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AboutComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(AboutComponent); diff --git a/libs/home/src/lib/containers/blog/blog.component.spec.ts b/libs/home/src/lib/containers/blog/blog.component.spec.ts index c6208ddbb..e3ea2b26e 100644 --- a/libs/home/src/lib/containers/blog/blog.component.spec.ts +++ b/libs/home/src/lib/containers/blog/blog.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { BlogComponent } from './blog.component'; @@ -6,11 +6,13 @@ describe('BlogComponent', () => { let component: BlogComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [BlogComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [BlogComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(BlogComponent); diff --git a/libs/home/src/lib/containers/features/features.component.spec.ts b/libs/home/src/lib/containers/features/features.component.spec.ts index ae3afae6d..046268443 100644 --- a/libs/home/src/lib/containers/features/features.component.spec.ts +++ b/libs/home/src/lib/containers/features/features.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { FeaturesComponent } from './features.component'; import { SharedModule } from '@ngx-starter-kit/shared'; import { SvgViewerModule } from '@ngx-starter-kit/svg-viewer'; @@ -16,12 +16,14 @@ describe('FeaturesComponent', () => { // }); }); - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [SharedModule], - declarations: [FeaturesComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [SharedModule], + declarations: [FeaturesComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(FeaturesComponent); diff --git a/libs/home/src/lib/containers/home-layout/home-layout.component.spec.ts b/libs/home/src/lib/containers/home-layout/home-layout.component.spec.ts index 2df826bea..5ea301861 100644 --- a/libs/home/src/lib/containers/home-layout/home-layout.component.spec.ts +++ b/libs/home/src/lib/containers/home-layout/home-layout.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { CoreModule } from '@ngx-starter-kit/core'; import { ScrollToTopModule } from '@ngx-starter-kit/scroll-to-top'; @@ -12,12 +12,14 @@ describe('HomeLayoutComponent', () => { let component: HomeLayoutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [SharedModule, CoreModule, ScrollToTopModule, ThemePickerModule, RouterTestingModule], - declarations: [HomeLayoutComponent, HeaderComponent, FooterComponent] - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [SharedModule, CoreModule, ScrollToTopModule, ThemePickerModule, RouterTestingModule], + declarations: [HomeLayoutComponent, HeaderComponent, FooterComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(HomeLayoutComponent); diff --git a/libs/home/src/lib/containers/landing/landing.component.spec.ts b/libs/home/src/lib/containers/landing/landing.component.spec.ts index ccbc0752d..36360f9f6 100644 --- a/libs/home/src/lib/containers/landing/landing.component.spec.ts +++ b/libs/home/src/lib/containers/landing/landing.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LandingComponent } from './landing.component'; import { RouterTestingModule } from '@angular/router/testing'; @@ -10,12 +10,14 @@ describe('LandingComponent', () => { let component: LandingComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [SvgViewerModule, RouterTestingModule, HttpClientTestingModule], - declarations: [LandingComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [SvgViewerModule, RouterTestingModule, HttpClientTestingModule], + declarations: [LandingComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LandingComponent); diff --git a/libs/home/src/lib/home.module.spec.ts b/libs/home/src/lib/home.module.spec.ts index 2d8729631..507ffd408 100644 --- a/libs/home/src/lib/home.module.spec.ts +++ b/libs/home/src/lib/home.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { HomeModule } from './home.module'; describe('HomeModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HomeModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [HomeModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(HomeModule).toBeDefined(); diff --git a/libs/image-comparison/src/lib/image-comparison.component.spec.ts b/libs/image-comparison/src/lib/image-comparison.component.spec.ts index 431ce1535..f63eedb70 100644 --- a/libs/image-comparison/src/lib/image-comparison.component.spec.ts +++ b/libs/image-comparison/src/lib/image-comparison.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ImageComparisonComponent } from './image-comparison.component'; @@ -6,11 +6,13 @@ describe('ImageComparisonComponent', () => { let component: ImageComparisonComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ImageComparisonComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ImageComparisonComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ImageComparisonComponent); diff --git a/libs/json-diff/src/lib/json-diff-tree.component.spec.ts b/libs/json-diff/src/lib/json-diff-tree.component.spec.ts index 9423e9d63..91bf29706 100644 --- a/libs/json-diff/src/lib/json-diff-tree.component.spec.ts +++ b/libs/json-diff/src/lib/json-diff-tree.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { JsonDiffTreeComponent } from './json-diff-tree.component'; @@ -6,11 +6,13 @@ describe('JsonDiffTreeComponent', () => { let component: JsonDiffTreeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [JsonDiffTreeComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [JsonDiffTreeComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(JsonDiffTreeComponent); diff --git a/libs/json-diff/src/lib/json-diff.component.spec.ts b/libs/json-diff/src/lib/json-diff.component.spec.ts index 8ba1f6f93..9652b3b6f 100644 --- a/libs/json-diff/src/lib/json-diff.component.spec.ts +++ b/libs/json-diff/src/lib/json-diff.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { JsonDiffComponent } from './json-diff.component'; @@ -6,11 +6,13 @@ describe('JsonDiffComponent', () => { let component: JsonDiffComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [JsonDiffComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [JsonDiffComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(JsonDiffComponent); diff --git a/libs/led/src/lib/led.component.spec.ts b/libs/led/src/lib/led.component.spec.ts index 37f605a0b..ad2fb6045 100644 --- a/libs/led/src/lib/led.component.spec.ts +++ b/libs/led/src/lib/led.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LedComponent } from './led.component'; @@ -6,11 +6,13 @@ describe('LedComponent', () => { let component: LedComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [LedComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LedComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LedComponent); diff --git a/libs/loading-overlay/src/lib/loading-overlay.component.spec.ts b/libs/loading-overlay/src/lib/loading-overlay.component.spec.ts index bd19ca821..0d49c2a69 100644 --- a/libs/loading-overlay/src/lib/loading-overlay.component.spec.ts +++ b/libs/loading-overlay/src/lib/loading-overlay.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LoadingOverlayComponent } from './loading-overlay.component'; @@ -6,11 +6,13 @@ describe('LoadingOverlayComponent', () => { let component: LoadingOverlayComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [LoadingOverlayComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [LoadingOverlayComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(LoadingOverlayComponent); diff --git a/libs/navigator/src/lib/navigator.module.spec.ts b/libs/navigator/src/lib/navigator.module.spec.ts index ca4b0a5da..db331693f 100644 --- a/libs/navigator/src/lib/navigator.module.spec.ts +++ b/libs/navigator/src/lib/navigator.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { NavigatorModule } from './navigator.module'; describe('NavigatorModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [NavigatorModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [NavigatorModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(NavigatorModule).toBeDefined(); diff --git a/libs/ngx-utils/src/lib/directives/ng-let/ng-let.directive.spec.ts b/libs/ngx-utils/src/lib/directives/ng-let/ng-let.directive.spec.ts index 1a99d5881..68c3e4571 100644 --- a/libs/ngx-utils/src/lib/directives/ng-let/ng-let.directive.spec.ts +++ b/libs/ngx-utils/src/lib/directives/ng-let/ng-let.directive.spec.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common'; import { Component, NgModule, ViewChild } from '@angular/core'; -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Observable, of } from 'rxjs'; import { NgLetDirective } from './ng-let.directive'; @@ -46,70 +46,88 @@ describe('ngLet directive', () => { expect(new NgLetModule()).toBeTruthy(); }); - it('should work in a template attribute', async(() => { - const template = 'hello{{ i }}'; - fixture = createTestComponent(template); - getComponent().test = 7; - fixture.detectChanges(); - expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); - expect(fixture.nativeElement.textContent).toBe('hello7'); - })); - - it('should work on a template element', async(() => { - const template = 'hello{{ i }}'; - fixture = createTestComponent(template); - getComponent().test = 5; - fixture.detectChanges(); - expect(fixture.nativeElement.textContent).toBe('hello5'); - })); - - it('should handle nested ngLet correctly', async(() => { - const template = '
hello{{ i + k }}
'; - - fixture = createTestComponent(template); - - getComponent().test = 3; - getComponent().nestedTest = 5; - fixture.detectChanges(); - expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); - expect(fixture.nativeElement.textContent).toBe('hello8'); - })); - - it('should update several nodes', async(() => { - const template = - 'helloNumber{{ i }}' + - 'helloFunction{{ j }}'; - - fixture = createTestComponent(template); - - getComponent().test = 4; - fixture.detectChanges(); - expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(2); - expect(fixture.nativeElement.textContent).toContain('helloNumber5helloFunction13'); - })); - - it('should work on async pipe', async(() => { - const template = 'helloAsync{{ t }}'; - - fixture = createTestComponent(template); - - getComponent().test$ = of(15); - fixture.detectChanges(); - expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); - expect(fixture.nativeElement.textContent).toContain('helloAsync15'); - })); - - it('should accept input', async(() => { - const template = 'hello{{ i }}'; - - fixture = createTestComponent(template); - fixture.detectChanges(); - - expect(getComponent().ngLetDirective).toBeTruthy(); - getComponent().ngLetDirective.ngLet = 21; - fixture.detectChanges(); - expect(fixture.nativeElement.textContent).toContain('hello21'); - })); + it( + 'should work in a template attribute', + waitForAsync(() => { + const template = 'hello{{ i }}'; + fixture = createTestComponent(template); + getComponent().test = 7; + fixture.detectChanges(); + expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); + expect(fixture.nativeElement.textContent).toBe('hello7'); + }) + ); + + it( + 'should work on a template element', + waitForAsync(() => { + const template = 'hello{{ i }}'; + fixture = createTestComponent(template); + getComponent().test = 5; + fixture.detectChanges(); + expect(fixture.nativeElement.textContent).toBe('hello5'); + }) + ); + + it( + 'should handle nested ngLet correctly', + waitForAsync(() => { + const template = '
hello{{ i + k }}
'; + + fixture = createTestComponent(template); + + getComponent().test = 3; + getComponent().nestedTest = 5; + fixture.detectChanges(); + expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); + expect(fixture.nativeElement.textContent).toBe('hello8'); + }) + ); + + it( + 'should update several nodes', + waitForAsync(() => { + const template = + 'helloNumber{{ i }}' + + 'helloFunction{{ j }}'; + + fixture = createTestComponent(template); + + getComponent().test = 4; + fixture.detectChanges(); + expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(2); + expect(fixture.nativeElement.textContent).toContain('helloNumber5helloFunction13'); + }) + ); + + it( + 'should work on async pipe', + waitForAsync(() => { + const template = 'helloAsync{{ t }}'; + + fixture = createTestComponent(template); + + getComponent().test$ = of(15); + fixture.detectChanges(); + expect(fixture.debugElement.queryAll(By.css('span')).length).toEqual(1); + expect(fixture.nativeElement.textContent).toContain('helloAsync15'); + }) + ); + + it( + 'should accept input', + waitForAsync(() => { + const template = 'hello{{ i }}'; + + fixture = createTestComponent(template); + fixture.detectChanges(); + + expect(getComponent().ngLetDirective).toBeTruthy(); + getComponent().ngLetDirective.ngLet = 21; + fixture.detectChanges(); + expect(fixture.nativeElement.textContent).toContain('hello21'); + }) + ); }); function createTestComponent(template: string): ComponentFixture { diff --git a/libs/not-found/src/lib/containers/not-found/not-found.component.spec.ts b/libs/not-found/src/lib/containers/not-found/not-found.component.spec.ts index 0dc62497f..c042ff8d1 100644 --- a/libs/not-found/src/lib/containers/not-found/not-found.component.spec.ts +++ b/libs/not-found/src/lib/containers/not-found/not-found.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NotFoundComponent } from './not-found.component'; @@ -6,11 +6,13 @@ describe('NotFoundComponent', () => { let component: NotFoundComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NotFoundComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NotFoundComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(NotFoundComponent); diff --git a/libs/not-found/src/lib/not-found.module.spec.ts b/libs/not-found/src/lib/not-found.module.spec.ts index 875d63f72..ef9c57ae5 100644 --- a/libs/not-found/src/lib/not-found.module.spec.ts +++ b/libs/not-found/src/lib/not-found.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { NotFoundModule } from './not-found.module'; describe('NotFoundModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [NotFoundModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [NotFoundModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(NotFoundModule).toBeDefined(); diff --git a/libs/notifications/src/lib/notifications.component.spec.ts b/libs/notifications/src/lib/notifications.component.spec.ts index 5970f6de6..1805fa640 100644 --- a/libs/notifications/src/lib/notifications.component.spec.ts +++ b/libs/notifications/src/lib/notifications.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NotificationsComponent } from './notifications.component'; @@ -6,11 +6,13 @@ describe('NotificationsComponent', () => { let component: NotificationsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [NotificationsComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [NotificationsComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(NotificationsComponent); diff --git a/libs/notifications/src/lib/notifications.module.spec.ts b/libs/notifications/src/lib/notifications.module.spec.ts index d1bf54183..918e904f4 100644 --- a/libs/notifications/src/lib/notifications.module.spec.ts +++ b/libs/notifications/src/lib/notifications.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; import { NotificationsModule } from './notifications.module'; describe('NotificationsModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [NotificationsModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [NotificationsModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(NotificationsModule).toBeDefined(); diff --git a/libs/quickpanel/src/lib/quickpanel.component.spec.ts b/libs/quickpanel/src/lib/quickpanel.component.spec.ts index c4042bbcc..5216a54ce 100644 --- a/libs/quickpanel/src/lib/quickpanel.component.spec.ts +++ b/libs/quickpanel/src/lib/quickpanel.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { QuickpanelComponent } from './quickpanel.component'; @@ -6,11 +6,13 @@ describe('QuickpanelComponent', () => { let component: QuickpanelComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [QuickpanelComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [QuickpanelComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(QuickpanelComponent); diff --git a/libs/scroll-to-top/src/lib/scroll-to-top.component.spec.ts b/libs/scroll-to-top/src/lib/scroll-to-top.component.spec.ts index cbb65d9fd..cbadbfdf1 100644 --- a/libs/scroll-to-top/src/lib/scroll-to-top.component.spec.ts +++ b/libs/scroll-to-top/src/lib/scroll-to-top.component.spec.ts @@ -1,21 +1,23 @@ import { DOCUMENT } from '@angular/common'; -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { WINDOW } from '@ngx-starter-kit/core'; import { defaultPageScrollConfig, NGXPS_CONFIG } from 'ngx-page-scroll-core'; import { ScrollToTopComponent } from './scroll-to-top.component'; import { ScrollToTopModule } from './scroll-to-top.module'; describe('ScrollToTopComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - providers: [ - { provide: NGXPS_CONFIG, useValue: defaultPageScrollConfig }, - { provide: DOCUMENT, useValue: document }, - { provide: WINDOW, useValue: window }, - ], - imports: [ScrollToTopModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [ + { provide: NGXPS_CONFIG, useValue: defaultPageScrollConfig }, + { provide: DOCUMENT, useValue: document }, + { provide: WINDOW, useValue: window }, + ], + imports: [ScrollToTopModule], + }).compileComponents(); + }) + ); it('should create', () => { const fixture = TestBed.createComponent(ScrollToTopComponent); diff --git a/libs/scroll-to-top/src/lib/scroll-to-top.module.spec.ts b/libs/scroll-to-top/src/lib/scroll-to-top.module.spec.ts index 1dfb6c95f..39da7d1f6 100644 --- a/libs/scroll-to-top/src/lib/scroll-to-top.module.spec.ts +++ b/libs/scroll-to-top/src/lib/scroll-to-top.module.spec.ts @@ -1,14 +1,16 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { defaultPageScrollConfig, NGXPS_CONFIG } from 'ngx-page-scroll-core'; import { ScrollToTopModule } from './scroll-to-top.module'; describe('ScrollToTopModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - providers: [{ provide: NGXPS_CONFIG, useValue: defaultPageScrollConfig }], - imports: [ScrollToTopModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: NGXPS_CONFIG, useValue: defaultPageScrollConfig }], + imports: [ScrollToTopModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(ScrollToTopModule).toBeDefined(); diff --git a/libs/shared/src/lib/containers/entity/entity-form.component.ts b/libs/shared/src/lib/containers/entity/entity-form.component.ts index d960adc97..0dfc1d665 100644 --- a/libs/shared/src/lib/containers/entity/entity-form.component.ts +++ b/libs/shared/src/lib/containers/entity/entity-form.component.ts @@ -4,6 +4,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { FormGroup } from '@angular/forms'; @Directive() +// tslint:disable-next-line: directive-class-suffix export abstract class EntityFormComponent implements OnInit { title: string; entity: TEntity; diff --git a/libs/shared/src/lib/containers/entity/entity.component.spec.ts b/libs/shared/src/lib/containers/entity/entity.component.spec.ts index 8f70de454..30bcd9f53 100644 --- a/libs/shared/src/lib/containers/entity/entity.component.spec.ts +++ b/libs/shared/src/lib/containers/entity/entity.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { EntityComponent } from './entity.component'; @@ -6,11 +6,13 @@ describe('EntityComponent', () => { let component: EntityComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [EntityComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [EntityComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(EntityComponent); diff --git a/libs/shared/src/lib/shared.module.spec.ts b/libs/shared/src/lib/shared.module.spec.ts index 2315c60f1..07c2b61b8 100644 --- a/libs/shared/src/lib/shared.module.spec.ts +++ b/libs/shared/src/lib/shared.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { SharedModule } from './shared.module'; describe('SharedModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [SharedModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [SharedModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(SharedModule).toBeDefined(); diff --git a/libs/sidenav/src/lib/components/menu-item/menu-item.component.spec.ts b/libs/sidenav/src/lib/components/menu-item/menu-item.component.spec.ts index ac96dadf4..b95b75957 100644 --- a/libs/sidenav/src/lib/components/menu-item/menu-item.component.spec.ts +++ b/libs/sidenav/src/lib/components/menu-item/menu-item.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { MenuItemComponent } from './menu-item.component'; @@ -6,11 +6,13 @@ describe('SideMenuItemComponent', () => { let component: MenuItemComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [MenuItemComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [MenuItemComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(MenuItemComponent); diff --git a/libs/sidenav/src/lib/components/sidenav-item/sidenav-item.component.spec.ts b/libs/sidenav/src/lib/components/sidenav-item/sidenav-item.component.spec.ts index 37e9ca8ce..534582f59 100644 --- a/libs/sidenav/src/lib/components/sidenav-item/sidenav-item.component.spec.ts +++ b/libs/sidenav/src/lib/components/sidenav-item/sidenav-item.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SidenavItemComponent } from './sidenav-item.component'; @@ -6,11 +6,13 @@ describe('SidenavItemComponent', () => { let component: SidenavItemComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SidenavItemComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SidenavItemComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SidenavItemComponent); diff --git a/libs/sidenav/src/lib/sidenav.component.spec.ts b/libs/sidenav/src/lib/sidenav.component.spec.ts index f3661cdac..fb8c9f1f4 100644 --- a/libs/sidenav/src/lib/sidenav.component.spec.ts +++ b/libs/sidenav/src/lib/sidenav.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SidenavComponent } from './sidenav.component'; @@ -6,11 +6,13 @@ describe('SidenavComponent', () => { let component: SidenavComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SidenavComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SidenavComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SidenavComponent); diff --git a/libs/svg-viewer/src/lib/svg-viewer.component.spec.ts b/libs/svg-viewer/src/lib/svg-viewer.component.spec.ts index ff23bad47..591d0fb3c 100644 --- a/libs/svg-viewer/src/lib/svg-viewer.component.spec.ts +++ b/libs/svg-viewer/src/lib/svg-viewer.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SvgViewerComponent } from './svg-viewer.component'; @@ -6,11 +6,13 @@ describe('SvgViewerComponent', () => { let component: SvgViewerComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SvgViewerComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SvgViewerComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SvgViewerComponent); diff --git a/libs/theme-picker/src/lib/theme-picker.component.spec.ts b/libs/theme-picker/src/lib/theme-picker.component.spec.ts index 35bc330de..b31484658 100644 --- a/libs/theme-picker/src/lib/theme-picker.component.spec.ts +++ b/libs/theme-picker/src/lib/theme-picker.component.spec.ts @@ -1,13 +1,15 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { ThemePickerComponent } from './theme-picker.component'; import { ThemePickerModule } from './theme-picker.module'; describe('ThemePickerComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ThemePickerModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ThemePickerModule], + }).compileComponents(); + }) + ); it('should install theme based on href', () => { const fixture = TestBed.createComponent(ThemePickerComponent); diff --git a/libs/toolbar/src/lib/components/fullscreen-toggle/fullscreen-toggle.component.spec.ts b/libs/toolbar/src/lib/components/fullscreen-toggle/fullscreen-toggle.component.spec.ts index 2a56f430c..fd0002c74 100644 --- a/libs/toolbar/src/lib/components/fullscreen-toggle/fullscreen-toggle.component.spec.ts +++ b/libs/toolbar/src/lib/components/fullscreen-toggle/fullscreen-toggle.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { FullscreenToggleComponent } from './fullscreen-toggle.component'; @@ -6,11 +6,13 @@ describe('FullscreenToggleComponent', () => { let component: FullscreenToggleComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [FullscreenToggleComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [FullscreenToggleComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(FullscreenToggleComponent); diff --git a/libs/toolbar/src/lib/components/quickpanel-toggle/quickpanel-toggle.component.spec.ts b/libs/toolbar/src/lib/components/quickpanel-toggle/quickpanel-toggle.component.spec.ts index c276bdde1..97dff63a6 100644 --- a/libs/toolbar/src/lib/components/quickpanel-toggle/quickpanel-toggle.component.spec.ts +++ b/libs/toolbar/src/lib/components/quickpanel-toggle/quickpanel-toggle.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { QuickpanelToggleComponent } from './quickpanel-toggle.component'; @@ -6,11 +6,13 @@ describe('QuickpanelToggleComponent', () => { let component: QuickpanelToggleComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [QuickpanelToggleComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [QuickpanelToggleComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(QuickpanelToggleComponent); diff --git a/libs/toolbar/src/lib/components/search-bar/search-bar.component.spec.ts b/libs/toolbar/src/lib/components/search-bar/search-bar.component.spec.ts index 17d442861..cba8e871d 100644 --- a/libs/toolbar/src/lib/components/search-bar/search-bar.component.spec.ts +++ b/libs/toolbar/src/lib/components/search-bar/search-bar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SearchBarComponent } from './search-bar.component'; @@ -6,11 +6,13 @@ describe('SearchBarComponent', () => { let component: SearchBarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SearchBarComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SearchBarComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SearchBarComponent); diff --git a/libs/toolbar/src/lib/components/search/search.component.spec.ts b/libs/toolbar/src/lib/components/search/search.component.spec.ts index 047c73bad..1647b270e 100644 --- a/libs/toolbar/src/lib/components/search/search.component.spec.ts +++ b/libs/toolbar/src/lib/components/search/search.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SearchComponent } from './search.component'; @@ -6,11 +6,13 @@ describe('SearchComponent', () => { let component: SearchComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SearchComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SearchComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SearchComponent); diff --git a/libs/toolbar/src/lib/components/sidenav-toggle/sidenav-toggle.component.spec.ts b/libs/toolbar/src/lib/components/sidenav-toggle/sidenav-toggle.component.spec.ts index cc14c4525..6d65cde58 100644 --- a/libs/toolbar/src/lib/components/sidenav-toggle/sidenav-toggle.component.spec.ts +++ b/libs/toolbar/src/lib/components/sidenav-toggle/sidenav-toggle.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SidenavToggleComponent } from './sidenav-toggle.component'; @@ -6,11 +6,13 @@ describe('SidenavToggleComponent', () => { let component: SidenavToggleComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [SidenavToggleComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SidenavToggleComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(SidenavToggleComponent); diff --git a/libs/toolbar/src/lib/components/user-menu/user-menu.component.spec.ts b/libs/toolbar/src/lib/components/user-menu/user-menu.component.spec.ts index d4ee1b367..e22ebbb37 100644 --- a/libs/toolbar/src/lib/components/user-menu/user-menu.component.spec.ts +++ b/libs/toolbar/src/lib/components/user-menu/user-menu.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { UserMenuComponent } from './user-menu.component'; @@ -6,11 +6,13 @@ describe('UserMenuComponent', () => { let component: UserMenuComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [UserMenuComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [UserMenuComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(UserMenuComponent); diff --git a/libs/toolbar/src/lib/toolbar.component.spec.ts b/libs/toolbar/src/lib/toolbar.component.spec.ts index 98804764d..62f0ada77 100644 --- a/libs/toolbar/src/lib/toolbar.component.spec.ts +++ b/libs/toolbar/src/lib/toolbar.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ToolbarComponent } from './toolbar.component'; @@ -6,11 +6,13 @@ describe('ToolbarComponent', () => { let component: ToolbarComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ToolbarComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ToolbarComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ToolbarComponent); diff --git a/libs/widgets/src/lib/components/list/list.component.spec.ts b/libs/widgets/src/lib/components/list/list.component.spec.ts index 88f58a832..593aee985 100755 --- a/libs/widgets/src/lib/components/list/list.component.spec.ts +++ b/libs/widgets/src/lib/components/list/list.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ListComponent } from './list.component'; @@ -6,11 +6,13 @@ describe('ListComponent', () => { let component: ListComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ListComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ListComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(ListComponent); diff --git a/libs/widgets/src/lib/containers/wizdash/wizdash.component.spec.ts b/libs/widgets/src/lib/containers/wizdash/wizdash.component.spec.ts index 06cc569e1..f9c8cc92c 100644 --- a/libs/widgets/src/lib/containers/wizdash/wizdash.component.spec.ts +++ b/libs/widgets/src/lib/containers/wizdash/wizdash.component.spec.ts @@ -1,16 +1,17 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { WizdashComponent } from './wizdash.component'; describe('WizdashComponent', () => { let component: WizdashComponent; let fixture: ComponentFixture; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [WizdashComponent], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [WizdashComponent], + }).compileComponents(); + }) + ); beforeEach(() => { fixture = TestBed.createComponent(WizdashComponent); diff --git a/libs/widgets/src/lib/widgets.module.spec.ts b/libs/widgets/src/lib/widgets.module.spec.ts index d2039ba26..6fac152fe 100644 --- a/libs/widgets/src/lib/widgets.module.spec.ts +++ b/libs/widgets/src/lib/widgets.module.spec.ts @@ -1,12 +1,14 @@ -import { async, TestBed } from '@angular/core/testing'; +import { waitForAsync, TestBed } from '@angular/core/testing'; import { WidgetsModule } from './widgets.module'; describe('WidgetsModule', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [WidgetsModule], - }).compileComponents(); - })); + beforeEach( + waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [WidgetsModule], + }).compileComponents(); + }) + ); it('should create', () => { expect(WidgetsModule).toBeDefined(); diff --git a/package.json b/package.json index da2e3a74b..c7dc84c26 100644 --- a/package.json +++ b/package.json @@ -233,8 +233,8 @@ "d3-selection": "1.4.2", "object-path": "0.11.5", "node-forge": "0.10.0", - "webpack-subresource-integrity":"1.5.1", - "yargs-parser":"20.2.3", - "mem":"4.0.0" + "webpack-subresource-integrity": "1.5.1", + "yargs-parser": "20.2.3", + "mem": "4.0.0" } }