Breaking Change. Swap arguments around and make default WidthType
This commit is contained in:
@ -15,13 +15,21 @@ describe("TableProperties", () => {
|
||||
});
|
||||
|
||||
describe("#setWidth", () => {
|
||||
it("adds a table width property", () => {
|
||||
const tp = new TableProperties().setWidth(WidthType.DXA, 1234);
|
||||
it("should add a table width property", () => {
|
||||
const tp = new TableProperties().setWidth(1234, WidthType.DXA);
|
||||
const tree = new Formatter().format(tp);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:tblPr": [{ "w:tblW": [{ _attr: { "w:type": "dxa", "w:w": 1234 } }] }],
|
||||
});
|
||||
});
|
||||
|
||||
it("should add a table width property with default of AUTO", () => {
|
||||
const tp = new TableProperties().setWidth(1234);
|
||||
const tree = new Formatter().format(tp);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:tblPr": [{ "w:tblW": [{ _attr: { "w:type": "auto", "w:w": 1234 } }] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("#setFixedWidthLayout", () => {
|
||||
|
Reference in New Issue
Block a user