Skip to content

Commit 5e3b692

Browse files
committed
test: add additional check to see if totalDataLength is 0 after deleteAllRows is called
Signed-off-by: Akshat Patel <[email protected]>
1 parent a8f6a74 commit 5e3b692

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/table/table-model.class.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ describe("Table", () => {
486486
tableModel.deleteAllRows();
487487

488488
expect(tableModel.data).toEqual([[]]);
489+
expect(tableModel.totalDataLength).toEqual(0);
490+
// Should still equal to 1, since we default to [[]] when we set data to an empty array
489491
expect(tableModel.rowsSelected.length).toEqual(1);
490492
expect(tableModel.rowsContext.length).toEqual(1);
491493
expect(tableModel.rowsExpanded.length).toEqual(1);

0 commit comments

Comments
 (0)