table cell width test

This commit is contained in:
Seiya
2019-10-12 03:14:25 +03:00
parent 06abde2425
commit bfbe59cb84

View File

@ -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: [],