change demos to typescript and WidthType disparity

This commit is contained in:
Dolan
2018-08-23 01:05:26 +01:00
parent 877dcb462f
commit fe2032a3d4
5 changed files with 39 additions and 37 deletions

View File

@ -4,6 +4,7 @@ import { expect } from "chai";
import { Formatter } from "../../export/formatter";
import { Paragraph } from "../paragraph";
import { Table } from "./";
import { WidthType } from "./table-cell";
const DEFAULT_TABLE_PROPERTIES = {
"w:tblBorders": [
@ -174,7 +175,7 @@ describe("Table", () => {
describe("#setWidth", () => {
it("sets the preferred width on the table", () => {
const table = new Table(2, 2).setWidth("pct", 1000);
const table = new Table(2, 2).setWidth(WidthType.PERCENTAGE, 1000);
const tree = new Formatter().format(table);
expect(tree)
.to.have.property("w:tbl")