UNPKG

docx

Version:

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

27 lines (23 loc) 796 B
import { expect } from "chai"; import { Formatter } from "export/formatter"; import { MathRun } from "../math-run"; import { MathNumerator } from "./math-numerator"; describe("MathNumerator", () => { describe("#constructor()", () => { it("should create a MathNumerator with correct root key", () => { const mathNumerator = new MathNumerator([new MathRun("2+2")]); const tree = new Formatter().format(mathNumerator); expect(tree).to.deep.equal({ "m:num": [ { "m:r": [ { "m:t": ["2+2"], }, ], }, ], }); }); }); });