* Documentation and Refactoring * Documentation and Refactoring * Fix lint issues * Convert components to Builder style --------- Co-authored-by: Dolan Miu <dmiu@bloomberg.net>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { Formatter } from "@export/formatter";
|
|
|
|
import { createMathBarProperties } from "./math-bar-properties";
|
|
|
|
describe("MathBarProperties", () => {
|
|
describe("#constructor()", () => {
|
|
it("should create a MathBarProperties with top key", () => {
|
|
const mathBarProperties = createMathBarProperties({ type: "top" });
|
|
|
|
const tree = new Formatter().format(mathBarProperties);
|
|
|
|
expect(tree).to.deep.equal({
|
|
"m:barPr": [
|
|
{
|
|
"m:pos": {
|
|
_attr: {
|
|
"w:val": "top",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
});
|
|
it("should create a MathBarProperties with bottom key", () => {
|
|
const mathBarProperties = createMathBarProperties({ type: "bot" });
|
|
|
|
const tree = new Formatter().format(mathBarProperties);
|
|
|
|
expect(tree).to.deep.equal({
|
|
"m:barPr": [
|
|
{
|
|
"m:pos": {
|
|
_attr: {
|
|
"w:val": "bot",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
});
|
|
});
|
|
});
|