Merge branch 'master' into feat/tslint-to-eslint
# Conflicts: # src/file/numbering/level.spec.ts # src/file/numbering/level.ts
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { AlignmentType } from "..";
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { Level, LevelFormat, LevelSuffix } from "./level";
|
||||
import { AlignmentType } from "..";
|
||||
|
||||
describe("Level", () => {
|
||||
describe("#constructor", () => {
|
||||
@ -21,4 +22,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,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user