diff --git a/src/file/table/table-cell/table-cell-properties.spec.ts b/src/file/table/table-cell/table-cell-properties.spec.ts index 9835aa9623..c3452e757c 100644 --- a/src/file/table/table-cell/table-cell-properties.spec.ts +++ b/src/file/table/table-cell/table-cell-properties.spec.ts @@ -73,6 +73,54 @@ describe("TableCellProperties", () => { }); }); + describe("#addMargins", () => { + it("sets shading", () => { + const properties = new TableCellProperties(); + properties.addMargins({}); + const tree = new Formatter().format(properties); + expect(tree).to.deep.equal({ + "w:tcPr": [ + { + "w:tcMar": [ + { + "w:top": { + _attr: { + "w:type": "dxa", + "w:w": 0, + }, + }, + }, + { + "w:bottom": { + _attr: { + "w:type": "dxa", + "w:w": 0, + }, + }, + }, + { + "w:end": { + _attr: { + "w:type": "dxa", + "w:w": 0, + }, + }, + }, + { + "w:start": { + _attr: { + "w:type": "dxa", + "w:w": 0, + }, + }, + }, + ], + }, + ], + }); + }); + }); + describe("#Borders", () => { it("should return the TableCellBorders if Border has borders", () => { const properties = new TableCellProperties();