Add addMargin test

This commit is contained in:
Dolan
2019-09-26 02:24:43 +01:00
parent 44b95f2f15
commit c5eb3d5670

View File

@ -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();