added fixedWidthLayout option and method

This commit is contained in:
felipe
2017-03-11 09:59:29 +01:00
parent 210b97d00b
commit c10b576a3a
4 changed files with 48 additions and 0 deletions

View File

@ -22,4 +22,16 @@ describe("TableProperties", () => {
});
});
});
describe("#fixedWidthLayout", () => {
it("sets the table to fixed width layout", () => {
const tp = new TableProperties().fixedWidthLayout();
const tree = new Formatter().format(tp);
expect(tree).to.deep.equal({
"w:tblPr": [
{"w:tblLayout": [{_attr: {"w:type": "fixed"}}]},
],
});
});
});
});