Skip to content

Commit c29f913

Browse files
committed
chore: increase code coverage for new code
1 parent 2e5682c commit c29f913

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/common/src/core/__tests__/slickGrid.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,6 +2139,19 @@ describe('SlickGrid core file', () => {
21392139
expect(headerElm).toBeInstanceOf(HTMLDivElement);
21402140
expect(headerElm.dataset.id).toBe('b');
21412141
});
2142+
2143+
it('should return undefined from getHeaderColumn fallback when target column is hidden', () => {
2144+
const columns = [
2145+
{ id: 'a', field: 'a', name: 'A', hidden: true },
2146+
{ id: 'b', field: 'b', name: 'B' },
2147+
] as Column[];
2148+
const rows = [{ id: 0, a: 'x', b: 'y' }];
2149+
2150+
grid = new SlickGrid<any, Column>(container, rows, columns, defaultOptions);
2151+
grid.init();
2152+
2153+
expect(grid.getHeaderColumn(0)).toBeUndefined();
2154+
});
21422155
});
21432156

21442157
describe('flashCell() method', () => {

0 commit comments

Comments
 (0)