Add Math Summation

This commit is contained in:
Dolan
2019-08-20 20:40:40 +01:00
parent a1b9be453b
commit 4f8d435e16
19 changed files with 359 additions and 2 deletions

View File

@ -0,0 +1,27 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { MathRun } from "../math-run";
import { MathSubScript } from "./math-sub-script";
describe("MathSubScript", () => {
describe("#constructor()", () => {
it("should create a MathSubScript with correct root key", () => {
const mathSubScript = new MathSubScript(new MathRun("2+2"));
const tree = new Formatter().format(mathSubScript);
expect(tree).to.deep.equal({
"m:sub": [
{
"m:r": [
{
"m:t": ["2+2"],
},
],
},
],
});
});
});
});