Files
docx-js/src/file/paragraph/math/n-ary/math-super-script.spec.ts

28 lines
810 B
TypeScript
Raw Normal View History

2019-08-20 20:40:40 +01:00
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { MathRun } from "../math-run";
import { MathSuperScript } from "./math-super-script";
describe("MathSuperScript", () => {
describe("#constructor()", () => {
it("should create a MathSuperScript with correct root key", () => {
const mathSuperScript = new MathSuperScript(new MathRun("2+2"));
const tree = new Formatter().format(mathSuperScript);
expect(tree).to.deep.equal({
"m:sup": [
{
"m:r": [
{
"m:t": ["2+2"],
},
],
},
],
});
});
});
});