Skip to content

Commit 5b700ed

Browse files
committed
chore: add missing test coverage
1 parent 50d7a7b commit 5b700ed

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

frameworks/angular-slickgrid/src/library/components/__tests__/angular-slickgrid.component.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ class AngularSlickRowDetailView {
7676
init = vi.fn();
7777
}
7878

79+
class ExcelExportService {
80+
static readonly pluginName = 'ExcelExportService';
81+
create = vi.fn();
82+
init = vi.fn();
83+
}
84+
7985
const backendUtilityServiceStub = {
8086
addRxJsResource: vi.fn(),
8187
executeBackendProcessesCallback: vi.fn(),
@@ -352,6 +358,7 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
352358
minWidth: 300,
353359
rightPadding: 0,
354360
},
361+
externalResources: [ExcelExportService],
355362
backendServiceApi: null,
356363
} as unknown as GridOption;
357364
vi.spyOn(mockGrid, 'getOptions').mockReturnValue(gridOptions);

packages/common/src/services/__tests__/rxjsFacade.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { describe, expect, it } from 'vitest';
22
import { Observable, RxJsFacade, Subject, Subscription } from '../rxjsFacade.js';
33

44
describe('RxJsFacade Service', () => {
5+
it('should return plugin name', () => {
6+
expect(new RxJsFacade().pluginName).toBe('RxJsResource');
7+
});
8+
59
it('should throw a not implemented error when calling "EMPTY" getter', () => {
610
expect(() => RxJsFacade.prototype.EMPTY).toThrow('RxJS Facade "EMPTY" constant must be implemented');
711
});

packages/vanilla-bundle/src/components/__tests__/slick-vanilla-grid.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const mockGraphqlService = {
102102
updatePagination: vi.fn(),
103103
} as unknown as GraphqlService;
104104

105-
class SlickRowDetailView {
106-
static readonly pluginName = 'RowDetailView';
105+
class ExcelExportService {
106+
static readonly pluginName = 'ExcelExportService';
107107
create = vi.fn();
108108
init = vi.fn();
109109
}
@@ -332,6 +332,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
332332
minWidth: 300,
333333
rightPadding: 0,
334334
},
335+
externalResources: [ExcelExportService],
335336
backendServiceApi: null,
336337
} as unknown as GridOption;
337338
sharedService = new SharedService();
@@ -1748,8 +1749,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
17481749
component.columnDefinitions = mockCols;
17491750
component.gridOptions = {
17501751
...gridOptions,
1751-
// enableRowDetailView: true,
1752-
externalResources: [SlickRowDetailView],
1752+
enableRowDetailView: true,
17531753
presets: { columns: mockColsPresets },
17541754
} as unknown as GridOption;
17551755
component.initialization(divContainer, slickEventHandler);

0 commit comments

Comments
 (0)