This commit is contained in:
Dolan Miu
2022-09-15 13:08:49 +01:00
parent af7d275c27
commit ebb3f8137e
2 changed files with 53 additions and 1 deletions

View File

@ -1,5 +1,7 @@
import { expect } from "chai";
import { Formatter } from "@export/formatter";
import { LevelFormat, LevelSuffix } from ".";
import { AlignmentType } from "..";
@ -22,4 +24,41 @@ describe("Level", () => {
).to.throw();
});
});
describe("isLegalNumberingStyle", () => {
it("should work", () => {
const concreteNumbering = new Level({
level: 9,
isLegalNumberingStyle: true,
});
const tree = new Formatter().format(concreteNumbering);
expect(tree).to.deep.equal({
"w:lvl": [
{
"w:start": {
_attr: {
"w:val": 1,
},
},
},
{
"w:isLgl": {},
},
{
"w:lvlJc": {
_attr: {
"w:val": "start",
},
},
},
{
_attr: {
"w15:tentative": 1,
"w:ilvl": 9,
},
},
],
});
});
});
});