]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/testing/unit-test-helper.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / testing / unit-test-helper.ts
index 12bef83cc58a6cf1419f09b94cf1c100fa3868a5..ca74ee21ecaef16ea13223eb038cb3900230a5b6 100644 (file)
@@ -6,7 +6,6 @@ import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/t
 
 import { NgbModal, NgbNav, NgbNavItem, NgbNavLink } from '@ng-bootstrap/ng-bootstrap';
 import _ from 'lodash';
-import { configureSuite } from '@apteco/ngth';
 import { of } from 'rxjs';
 
 import { InventoryDevice } from '~/app/ceph/cluster/inventory/inventory-devices/inventory-device.model';
@@ -31,15 +30,18 @@ import {
 } from '~/app/shared/models/prometheus-alerts';
 
 export function configureTestBed(configuration: any, entryComponents?: any) {
-  configureSuite(() => {
+  beforeEach(async () => {
     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 }
-      });
+      await TestBed.configureTestingModule(configuration).overrideModule(
+        BrowserDynamicTestingModule,
+        {
+          set: { entryComponents: entryComponents }
+        }
+      );
     } else {
-      TestBed.configureTestingModule(configuration);
+      await TestBed.configureTestingModule(configuration);
     }
   });
 }