]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/table-performance-counter/table-performance-counter.component.spec.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / performance-counter / table-performance-counter / table-performance-counter.component.spec.ts
index 769dde5832441e82eaeae215bb5050d6d79c73eb..fd826440592f83d3d16cbd84c764d2603d36a9fd 100644 (file)
@@ -1,9 +1,9 @@
 import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
-import { AppModule } from '../../../app.module';
-import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context';
+import { AppModule } from '~/app/app.module';
+import { CdTableFetchDataContext } from '~/app/shared/models/cd-table-fetch-data-context';
+import { configureTestBed } from '~/testing/unit-test-helper';
 import { TablePerformanceCounterComponent } from './table-performance-counter.component';
 
 describe('TablePerformanceCounterComponent', () => {
@@ -12,14 +12,13 @@ describe('TablePerformanceCounterComponent', () => {
   let httpTesting: HttpTestingController;
 
   configureTestBed({
-    imports: [AppModule, HttpClientTestingModule],
-    providers: i18nProviders
+    imports: [AppModule, HttpClientTestingModule]
   });
 
   beforeEach(() => {
     fixture = TestBed.createComponent(TablePerformanceCounterComponent);
     component = fixture.componentInstance;
-    httpTesting = TestBed.get(HttpTestingController);
+    httpTesting = TestBed.inject(HttpTestingController);
     fixture.detectChanges();
   });
 
@@ -33,7 +32,7 @@ describe('TablePerformanceCounterComponent', () => {
   });
 
   describe('Error handling', () => {
-    const context = new CdTableFetchDataContext(() => {});
+    const context = new CdTableFetchDataContext(() => undefined);
 
     beforeEach(() => {
       spyOn(context, 'error');