Skip to content

Commit

Permalink
Add more test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vbabich committed Sep 23, 2024
1 parent ff928a3 commit 273a2a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/iris-grid/src/IrisGridModel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ it('updates the model correctly when adding and removing a rollup config', async
expect(table.rollup).not.toHaveBeenCalled();
});

it('isRollupAvailable checks if the rollup method is defined', async () => {
const table = irisGridTestUtils.makeTable();

const mock = jest.fn();
table.rollup = mock;
const model = irisGridTestUtils.makeModel(table);

expect(model.isRollupAvailable).toBe(true);
});

it('closes the table correctly when the model is closed', () => {
const table = irisGridTestUtils.makeTable();
table.close = jest.fn();
Expand Down

0 comments on commit 273a2a6

Please sign in to comment.