From 50fc9b62744db0ce2164bf3c29b92736f0c83d82 Mon Sep 17 00:00:00 2001 From: Dolan Date: Tue, 5 Mar 2019 01:45:04 +0000 Subject: [PATCH] Test index out of bounds --- src/file/table/table-column.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/file/table/table-column.spec.ts b/src/file/table/table-column.spec.ts index c1860c2d5c..a536bcd01b 100644 --- a/src/file/table/table-column.spec.ts +++ b/src/file/table/table-column.spec.ts @@ -22,6 +22,12 @@ describe("TableColumn", () => { expect(cell2).to.deep.equal(cells[1]); }); + + it("should throw an error if index is out of bounds", () => { + const tableColumn = new TableColumn(cells); + + expect(() => tableColumn.getCell(9)).to.throw(); + }); }); describe("#mergeCells", () => {