diff --git a/src/file/table/table-cell/table-cell.spec.ts b/src/file/table/table-cell/table-cell.spec.ts index 4dd86ffc9c..a4c316f7ba 100644 --- a/src/file/table/table-cell/table-cell.spec.ts +++ b/src/file/table/table-cell/table-cell.spec.ts @@ -395,6 +395,33 @@ describe("TableCell", () => { }); }); + it("should create with width", () => { + const cell = new TableCell({ + children: [], + width: { size: 100, type: WidthType.DXA }, + }); + const tree = new Formatter().format(cell); + expect(tree).to.deep.equal({ + "w:tc": [ + { + "w:tcPr": [ + { + "w:tcW": { + _attr: { + "w:type": "dxa", + "w:w": 100, + }, + }, + }, + ], + }, + { + "w:p": {}, + }, + ], + }); + }); + it("should create with column span", () => { const cell = new TableCell({ children: [],