]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Remove entryComponents 34933/head
authorTiago Melo <tmelo@suse.com>
Mon, 8 Jun 2020 20:15:13 +0000 (20:15 +0000)
committerTiago Melo <tmelo@suse.com>
Mon, 8 Jun 2020 20:15:13 +0000 (20:15 +0000)
entryComponents is no longer required in Angular 9.

Fixes: https://tracker.ceph.com/issues/45325
Signed-off-by: Tiago Melo <tmelo@suse.com>
19 files changed:
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/mgr-modules/mgr-module-form/mgr-module-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/directives.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/directives/form-loading.directive.spec.ts
src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts

index c1357864d5dcee0bf17adb5f3c74f4625bdfd950..f3ea0daab318f7a0441b671a0491903ae36d11c3 100644 (file)
@@ -41,18 +41,6 @@ import { RbdTrashPurgeModalComponent } from './rbd-trash-purge-modal/rbd-trash-p
 import { RbdTrashRestoreModalComponent } from './rbd-trash-restore-modal/rbd-trash-restore-modal.component';
 
 @NgModule({
-  entryComponents: [
-    RbdDetailsComponent,
-    RbdNamespaceFormModalComponent,
-    RbdSnapshotFormModalComponent,
-    RbdTrashMoveModalComponent,
-    RbdTrashRestoreModalComponent,
-    RbdTrashPurgeModalComponent,
-    IscsiTargetDetailsComponent,
-    IscsiTargetImageSettingsModalComponent,
-    IscsiTargetIqnSettingsModalComponent,
-    IscsiTargetDiscoveryModalComponent
-  ],
   imports: [
     CommonModule,
     MirroringModule,
index 1e99f242d781a3afec961979441f338f4ca9edb1..299cefd7f207a7ff330a1697de3e901d5defaeba 100644 (file)
@@ -13,6 +13,7 @@ import {
   i18nProviders,
   IscsiHelper
 } from '../../../../testing/unit-test-helper';
+import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
 import { CdFormGroup } from '../../../shared/forms/cd-form-group';
 import { SharedModule } from '../../../shared/shared.module';
 import { IscsiTargetFormComponent } from './iscsi-target-form.component';
@@ -141,23 +142,26 @@ describe('IscsiTargetFormComponent', () => {
     }
   ];
 
-  configureTestBed({
-    declarations: [IscsiTargetFormComponent],
-    imports: [
-      SharedModule,
-      ReactiveFormsModule,
-      HttpClientTestingModule,
-      RouterTestingModule,
-      ToastrModule.forRoot()
-    ],
-    providers: [
-      i18nProviders,
-      {
-        provide: ActivatedRoute,
-        useValue: new ActivatedRouteStub({ target_iqn: undefined })
-      }
-    ]
-  });
+  configureTestBed(
+    {
+      declarations: [IscsiTargetFormComponent],
+      imports: [
+        SharedModule,
+        ReactiveFormsModule,
+        HttpClientTestingModule,
+        RouterTestingModule,
+        ToastrModule.forRoot()
+      ],
+      providers: [
+        i18nProviders,
+        {
+          provide: ActivatedRoute,
+          useValue: new ActivatedRouteStub({ target_iqn: undefined })
+        }
+      ]
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     fixture = TestBed.createComponent(IscsiTargetFormComponent);
index 917de076da08b75d2af02ca82ed9dee2944edd7d..a9265d28dd76b093be4e8edce898400ee8bb4abc 100644 (file)
@@ -22,14 +22,6 @@ import { PoolEditPeerModalComponent } from './pool-edit-peer-modal/pool-edit-pee
 import { PoolListComponent } from './pool-list/pool-list.component';
 
 @NgModule({
-  entryComponents: [
-    BootstrapCreateModalComponent,
-    BootstrapImportModalComponent,
-    EditSiteNameModalComponent,
-    OverviewComponent,
-    PoolEditModeModalComponent,
-    PoolEditPeerModalComponent
-  ],
   imports: [
     CommonModule,
     SharedModule,
index f597a57ace7eb8f7207875c8bb546f1da6df64f3..475aa0e0dea8e4bbc2b6d77d1240046b140545c6 100644 (file)
@@ -11,7 +11,6 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { ModalModule } from 'ngx-bootstrap/modal';
 import { TimepickerModule } from 'ngx-bootstrap/timepicker';
 
-import { OrchestratorDocModalComponent } from '../../shared/components/orchestrator-doc-modal/orchestrator-doc-modal.component';
 import { SharedModule } from '../../shared/shared.module';
 import { PerformanceCounterModule } from '../performance-counter/performance-counter.module';
 import { CephSharedModule } from '../shared/ceph-shared.module';
@@ -51,19 +50,6 @@ import { ServicesComponent } from './services/services.component';
 import { TelemetryComponent } from './telemetry/telemetry.component';
 
 @NgModule({
-  entryComponents: [
-    OsdDetailsComponent,
-    OsdScrubModalComponent,
-    OsdFlagsModalComponent,
-    OsdRecvSpeedModalComponent,
-    OsdReweightModalComponent,
-    OsdPgScrubModalComponent,
-    OsdReweightModalComponent,
-    SilenceMatcherModalComponent,
-    OsdDevicesSelectionModalComponent,
-    OsdCreationPreviewModalComponent,
-    OrchestratorDocModalComponent
-  ],
   imports: [
     CommonModule,
     PerformanceCounterModule,
index 4ed2e3879f848ed42e4dbb5a7bbdf1fe2679b6da..d2a4dec9c7e544d793aceea9a3ff75bad5ff9702 100644 (file)
@@ -6,6 +6,7 @@ import { ToastrModule } from 'ngx-toastr';
 import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { LoadingPanelComponent } from '../../../../shared/components/loading-panel/loading-panel.component';
 import { SharedModule } from '../../../../shared/shared.module';
 import { HostFormComponent } from './host-form.component';
 
@@ -13,17 +14,20 @@ describe('HostFormComponent', () => {
   let component: HostFormComponent;
   let fixture: ComponentFixture<HostFormComponent>;
 
-  configureTestBed({
-    imports: [
-      SharedModule,
-      HttpClientTestingModule,
-      RouterTestingModule,
-      ReactiveFormsModule,
-      ToastrModule.forRoot()
-    ],
-    providers: [i18nProviders],
-    declarations: [HostFormComponent]
-  });
+  configureTestBed(
+    {
+      imports: [
+        SharedModule,
+        HttpClientTestingModule,
+        RouterTestingModule,
+        ReactiveFormsModule,
+        ToastrModule.forRoot()
+      ],
+      providers: [i18nProviders],
+      declarations: [HostFormComponent]
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     fixture = TestBed.createComponent(HostFormComponent);
index 1832ccd8c3af5e9ae50db0558671aeefca0c688d..18cbb7609bd6b61c2d0f9b72c4d0b5ecb1d7985f 100644 (file)
@@ -6,6 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing';
 import { ToastrModule } from 'ngx-toastr';
 
 import { configureTestBed, i18nProviders } from '../../../../../testing/unit-test-helper';
+import { LoadingPanelComponent } from '../../../../shared/components/loading-panel/loading-panel.component';
 import { SharedModule } from '../../../../shared/shared.module';
 import { MgrModuleFormComponent } from './mgr-module-form.component';
 
@@ -13,17 +14,20 @@ describe('MgrModuleFormComponent', () => {
   let component: MgrModuleFormComponent;
   let fixture: ComponentFixture<MgrModuleFormComponent>;
 
-  configureTestBed({
-    declarations: [MgrModuleFormComponent],
-    imports: [
-      HttpClientTestingModule,
-      ReactiveFormsModule,
-      RouterTestingModule,
-      SharedModule,
-      ToastrModule.forRoot()
-    ],
-    providers: i18nProviders
-  });
+  configureTestBed(
+    {
+      declarations: [MgrModuleFormComponent],
+      imports: [
+        HttpClientTestingModule,
+        ReactiveFormsModule,
+        RouterTestingModule,
+        SharedModule,
+        ToastrModule.forRoot()
+      ],
+      providers: i18nProviders
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     fixture = TestBed.createComponent(MgrModuleFormComponent);
index 2e5e95ece7527b308f57128c7c4283d206f585ce..a495c8507dcf8a23a0dafd2ae23eccfce2da4dcd 100644 (file)
@@ -12,6 +12,7 @@ import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-h
 import { MgrModuleService } from '../../../shared/api/mgr-module.service';
 import { TelemetryService } from '../../../shared/api/telemetry.service';
 
+import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
 import { TextToDownloadService } from '../../../shared/services/text-to-download.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { TelemetryComponent } from './telemetry.component';
@@ -47,17 +48,20 @@ describe('TelemetryComponent', () => {
     'url'
   ];
 
-  configureTestBed({
-    declarations: [TelemetryComponent],
-    imports: [
-      HttpClientTestingModule,
-      ReactiveFormsModule,
-      RouterTestingModule,
-      SharedModule,
-      ToastrModule.forRoot()
-    ],
-    providers: i18nProviders
-  });
+  configureTestBed(
+    {
+      declarations: [TelemetryComponent],
+      imports: [
+        HttpClientTestingModule,
+        ReactiveFormsModule,
+        RouterTestingModule,
+        SharedModule,
+        ToastrModule.forRoot()
+      ],
+      providers: i18nProviders
+    },
+    [LoadingPanelComponent]
+  );
 
   describe('configForm', () => {
     beforeEach(() => {
index ad4df81dd5edaee71abdf8dce418c23ebb9ff308..ee424ae51b13b6c111ba61f9f37539b87c0bfbee 100644 (file)
@@ -10,6 +10,7 @@ import { of } from 'rxjs';
 
 import { ActivatedRouteStub } from '../../../../testing/activated-route-stub';
 import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
 import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
 import { SummaryService } from '../../../shared/services/summary.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -22,26 +23,29 @@ describe('NfsFormComponent', () => {
   let httpTesting: HttpTestingController;
   let activatedRoute: ActivatedRouteStub;
 
-  configureTestBed({
-    declarations: [NfsFormComponent, NfsFormClientComponent],
-    imports: [
-      HttpClientTestingModule,
-      ReactiveFormsModule,
-      RouterTestingModule,
-      SharedModule,
-      ToastrModule.forRoot(),
-      NgbTypeaheadModule
-    ],
-    providers: [
-      {
-        provide: ActivatedRoute,
-        useValue: new ActivatedRouteStub({ cluster_id: undefined, export_id: undefined })
-      },
-      i18nProviders,
-      SummaryService,
-      CephReleaseNamePipe
-    ]
-  });
+  configureTestBed(
+    {
+      declarations: [NfsFormComponent, NfsFormClientComponent],
+      imports: [
+        HttpClientTestingModule,
+        ReactiveFormsModule,
+        RouterTestingModule,
+        SharedModule,
+        ToastrModule.forRoot(),
+        NgbTypeaheadModule
+      ],
+      providers: [
+        {
+          provide: ActivatedRoute,
+          useValue: new ActivatedRouteStub({ cluster_id: undefined, export_id: undefined })
+        },
+        i18nProviders,
+        SummaryService,
+        CephReleaseNamePipe
+      ]
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     const summaryService = TestBed.inject(SummaryService);
index 4a936bf6ee8c650cd4ba72e0814ad3054a3928c6..5ba3e9b1a1696edb44cd11d82eb5422975d7859e 100644 (file)
@@ -37,8 +37,7 @@ import { PoolListComponent } from './pool-list/pool-list.component';
     ErasureCodeProfileFormModalComponent,
     CrushRuleFormModalComponent,
     PoolDetailsComponent
-  ],
-  entryComponents: [CrushRuleFormModalComponent, ErasureCodeProfileFormModalComponent]
+  ]
 })
 export class PoolModule {}
 
index 970661139526dd9ede4b552fde148310051bf1e8..e835faaffc9f712e09323a7878db077e157d9417 100644 (file)
@@ -27,15 +27,6 @@ import { RgwUserSubuserModalComponent } from './rgw-user-subuser-modal/rgw-user-
 import { RgwUserSwiftKeyModalComponent } from './rgw-user-swift-key-modal/rgw-user-swift-key-modal.component';
 
 @NgModule({
-  entryComponents: [
-    RgwDaemonDetailsComponent,
-    RgwBucketDetailsComponent,
-    RgwUserDetailsComponent,
-    RgwUserSwiftKeyModalComponent,
-    RgwUserS3KeyModalComponent,
-    RgwUserCapabilityModalComponent,
-    RgwUserSubuserModalComponent
-  ],
   imports: [
     CommonModule,
     SharedModule,
index 2210cef8d226ef108c6decf578d14be425d21d78..54786e73761b40ae7ed1e80fc10c5177a7092925 100644 (file)
@@ -11,6 +11,7 @@ import { of } from 'rxjs';
 import { configureTestBed, FormHelper, i18nProviders } from '../../../../testing/unit-test-helper';
 import { RoleService } from '../../../shared/api/role.service';
 import { ScopeService } from '../../../shared/api/scope.service';
+import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
 import { CdFormGroup } from '../../../shared/forms/cd-form-group';
 import { NotificationService } from '../../../shared/services/notification.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -31,17 +32,20 @@ describe('RoleFormComponent', () => {
 
   const routes: Routes = [{ path: 'roles', component: FakeComponent }];
 
-  configureTestBed({
-    imports: [
-      RouterTestingModule.withRoutes(routes),
-      HttpClientTestingModule,
-      ReactiveFormsModule,
-      ToastrModule.forRoot(),
-      SharedModule
-    ],
-    declarations: [RoleFormComponent, FakeComponent],
-    providers: i18nProviders
-  });
+  configureTestBed(
+    {
+      imports: [
+        RouterTestingModule.withRoutes(routes),
+        HttpClientTestingModule,
+        ReactiveFormsModule,
+        ToastrModule.forRoot(),
+        SharedModule
+      ],
+      declarations: [RoleFormComponent, FakeComponent],
+      providers: i18nProviders
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     fixture = TestBed.createComponent(RoleFormComponent);
index abfd8f305091f6ac269017448b147da159490d5e..df3bc8b08d4eb755a232a7b0e1e34feef6e0f9b0 100644 (file)
@@ -16,6 +16,7 @@ import { RoleService } from '../../../shared/api/role.service';
 import { SettingsService } from '../../../shared/api/settings.service';
 import { UserService } from '../../../shared/api/user.service';
 import { ComponentsModule } from '../../../shared/components/components.module';
+import { LoadingPanelComponent } from '../../../shared/components/loading-panel/loading-panel.component';
 import { CdFormGroup } from '../../../shared/forms/cd-form-group';
 import { AuthStorageService } from '../../../shared/services/auth-storage.service';
 import { NotificationService } from '../../../shared/services/notification.service';
@@ -44,20 +45,23 @@ describe('UserFormComponent', () => {
     { path: 'users', component: FakeComponent }
   ];
 
-  configureTestBed({
-    imports: [
-      RouterTestingModule.withRoutes(routes),
-      HttpClientTestingModule,
-      ReactiveFormsModule,
-      ComponentsModule,
-      ToastrModule.forRoot(),
-      SharedModule,
-      ButtonsModule.forRoot(),
-      BsDatepickerModule.forRoot()
-    ],
-    declarations: [UserFormComponent, FakeComponent],
-    providers: i18nProviders
-  });
+  configureTestBed(
+    {
+      imports: [
+        RouterTestingModule.withRoutes(routes),
+        HttpClientTestingModule,
+        ReactiveFormsModule,
+        ComponentsModule,
+        ToastrModule.forRoot(),
+        SharedModule,
+        ButtonsModule.forRoot(),
+        BsDatepickerModule.forRoot()
+      ],
+      declarations: [UserFormComponent, FakeComponent],
+      providers: i18nProviders
+    },
+    [LoadingPanelComponent]
+  );
 
   beforeEach(() => {
     spyOn(TestBed.inject(PasswordPolicyService), 'getHelpText').and.callFake(() => of(''));
index bee03ba03a4fff09f9b48fbea50b478a3f67e1c2..cce5f87d6f1d00c72bb72aef48a89c26f1d352fe 100644 (file)
@@ -18,7 +18,6 @@ import { NavigationComponent } from './navigation/navigation.component';
 import { NotificationsComponent } from './notifications/notifications.component';
 
 @NgModule({
-  entryComponents: [AboutComponent],
   imports: [
     CommonModule,
     AuthModule,
index 2368cb1e231938eacd9fb5078fa29e41c41266c7..c667e7c84529c339fc10ffbf8d8a3da125e02f43 100644 (file)
@@ -105,12 +105,6 @@ import { ViewCacheComponent } from './view-cache/view-cache.component';
     AlertPanelComponent,
     PwdExpirationNotificationComponent,
     OrchestratorDocPanelComponent
-  ],
-  entryComponents: [
-    ModalComponent,
-    CriticalConfirmationModalComponent,
-    ConfirmationModalComponent,
-    FormModalComponent
   ]
 })
 export class ComponentsModule {}
index ba77dc88ad1f47a6edd9d605a37e3a10ad13e617..77c5b153e514e02b7899bb836f65ad2b673dc0bd 100644 (file)
@@ -17,9 +17,7 @@ import { ModalComponent } from '../modal/modal.component';
 import { SubmitButtonComponent } from '../submit-button/submit-button.component';
 import { ConfirmationModalComponent } from './confirmation-modal.component';
 
-@NgModule({
-  entryComponents: [ConfirmationModalComponent]
-})
+@NgModule({})
 export class MockModule {}
 
 @Component({
index 82db2629053339862aac709b83aa3808e09d77da..f0a7cb7c4c375979245863ac7aa3aae941d9bcb5 100644 (file)
@@ -12,9 +12,7 @@ import { AlertPanelComponent } from '../alert-panel/alert-panel.component';
 import { LoadingPanelComponent } from '../loading-panel/loading-panel.component';
 import { CriticalConfirmationModalComponent } from './critical-confirmation-modal.component';
 
-@NgModule({
-  entryComponents: [CriticalConfirmationModalComponent]
-})
+@NgModule({})
 export class MockModule {}
 
 @Component({
index 1fdc7a9ba076ae4271f8b8986c6d55272bd63f55..a72c6f6c68c9cb63932e6f299ae9db563963ee8e 100644 (file)
@@ -1,7 +1,5 @@
 import { NgModule } from '@angular/core';
 
-import { AlertPanelComponent } from '../components/alert-panel/alert-panel.component';
-import { LoadingPanelComponent } from '../components/loading-panel/loading-panel.component';
 import { AutofocusDirective } from './autofocus.directive';
 import { Copy2ClipboardButtonDirective } from './copy2clipboard-button.directive';
 import { DimlessBinaryPerSecondDirective } from './dimless-binary-per-second.directive';
@@ -35,8 +33,6 @@ import { TrimDirective } from './trim.directive';
     MillisecondsDirective,
     IopsDirective,
     FormLoadingDirective
-  ],
-  providers: [],
-  entryComponents: [LoadingPanelComponent, AlertPanelComponent]
+  ]
 })
 export class DirectivesModule {}
index 8f0875a4f318ef5656c67a76fb7da6bdfa12fbf2..d30233a69b9ae36b1dd3dca9e101cf85f18a092a 100644 (file)
@@ -5,6 +5,8 @@ import { By } from '@angular/platform-browser';
 import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap';
 
 import { configureTestBed, i18nProviders } from '../../../testing/unit-test-helper';
+import { AlertPanelComponent } from '../components/alert-panel/alert-panel.component';
+import { LoadingPanelComponent } from '../components/loading-panel/loading-panel.component';
 import { CdForm } from '../forms/cd-form';
 import { SharedModule } from '../shared.module';
 import { FormLoadingDirective } from './form-loading.directive';
@@ -26,11 +28,14 @@ describe('FormLoadingDirective', () => {
     expect(fixture.debugElement.queryAll(By.css('cd-loading-panel')).length).toEqual(loading);
   };
 
-  configureTestBed({
-    declarations: [TestComponent],
-    imports: [SharedModule, NgbAlertModule],
-    providers: [i18nProviders]
-  });
+  configureTestBed(
+    {
+      declarations: [TestComponent],
+      imports: [SharedModule, NgbAlertModule],
+      providers: [i18nProviders]
+    },
+    [LoadingPanelComponent, AlertPanelComponent]
+  );
 
   afterEach(() => {
     fixture = null;
index e6869c5ee193e531122e57424592bbc28096f4b9..8045147f5b1f4a1677b3afc844dddb1eb4cd4b44 100644 (file)
@@ -2,6 +2,7 @@ import { DebugElement, LOCALE_ID, TRANSLATIONS, TRANSLATIONS_FORMAT, Type } from
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { AbstractControl } from '@angular/forms';
 import { By } from '@angular/platform-browser';
+import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
 
 import { I18n } from '@ngx-translate/i18n-polyfill';
 import { configureTestSuite } from 'ng-bullet';
@@ -23,8 +24,18 @@ import {
   PrometheusRule
 } from '../app/shared/models/prometheus-alerts';
 
-export function configureTestBed(configuration: any) {
-  configureTestSuite(() => TestBed.configureTestingModule(configuration));
+export function configureTestBed(configuration: any, entryComponents?: any) {
+  configureTestSuite(() => {
+    if (entryComponents) {
+      // Declare entryComponents without having to add them to a module
+      // This is needed since Jest doesn't yet support not declaring entryComponents
+      TestBed.configureTestingModule(configuration).overrideModule(BrowserDynamicTestingModule, {
+        set: { entryComponents: entryComponents }
+      });
+    } else {
+      TestBed.configureTestingModule(configuration);
+    }
+  });
 }
 
 export class PermissionHelper {