UNPKG

docx

Version:

Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

18 lines (14 loc) 520 B
import { expect } from "chai"; import { Formatter } from "export/formatter"; import { VerticalPositionAlign } from "file/shared/alignment"; import { Align } from "./align"; describe("Align", () => { describe("#constructor()", () => { it("should create a element with correct root key", () => { const tree = new Formatter().format(new Align(VerticalPositionAlign.CENTER)); expect(tree).to.deep.equal({ "wp:align": ["center"], }); }); }); });