Add Math Summation
This commit is contained in:
27
src/file/paragraph/math/n-ary/math-super-script.spec.ts
Normal file
27
src/file/paragraph/math/n-ary/math-super-script.spec.ts
Normal file
@ -0,0 +1,27 @@
|
||||
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"],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user