docx
Version:
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
33 lines (28 loc) • 1.12 kB
text/typescript
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { LatentStyleException } from "./exceptions";
describe("LatentStyleException", () => {
describe("#constructor()", () => {
it("should create", () => {
const currentLatentStyleException = new LatentStyleException({
name: "test-name",
uiPriority: "test-uiPriority",
qFormat: "test-qFormat",
semiHidden: "test-semiHidden",
unhideWhenUsed: "test-unhideWhenUsed",
});
const tree = new Formatter().format(currentLatentStyleException);
expect(tree).to.deep.equal({
"w:lsdException": {
_attr: {
"w:name": "test-name",
"w:qFormat": "test-qFormat",
"w:semiHidden": "test-semiHidden",
"w:uiPriority": "test-uiPriority",
"w:unhideWhenUsed": "test-unhideWhenUsed",
},
},
});
});
});
});