2019-06-26 22:12:18 +01:00
|
|
|
import { expect } from "chai";
|
2019-01-15 15:39:48 +01:00
|
|
|
|
2019-06-26 22:12:18 +01:00
|
|
|
import { Formatter } from "export/formatter";
|
2019-01-15 15:39:48 +01:00
|
|
|
|
|
|
|
import { OutlineLevel } from "./outline-level";
|
|
|
|
|
|
|
|
describe("ParagraphOutlineLevel", () => {
|
|
|
|
let outlineLevel: OutlineLevel;
|
|
|
|
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("should create an outlineLevel with given value", () => {
|
2019-06-12 01:03:36 +01:00
|
|
|
outlineLevel = new OutlineLevel(0);
|
2019-06-26 22:12:18 +01:00
|
|
|
const tree = new Formatter().format(outlineLevel);
|
|
|
|
expect(tree).to.deep.equal({
|
|
|
|
"w:outlineLvl": {
|
|
|
|
_attr: {
|
2019-07-02 01:33:41 +01:00
|
|
|
"w:val": 0,
|
2019-06-26 22:12:18 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2019-01-15 15:39:48 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|