#2733 Add error if level exceeds 9
This commit is contained in:
25
src/file/numbering/level.spec.ts
Normal file
25
src/file/numbering/level.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { LevelFormat, LevelSuffix } from ".";
|
||||
import { AlignmentType } from "..";
|
||||
|
||||
import { Level } from "./level";
|
||||
|
||||
describe("Level", () => {
|
||||
describe("#constructor", () => {
|
||||
it("should throw an error if level exceeds 9", () => {
|
||||
expect(
|
||||
() =>
|
||||
new Level({
|
||||
level: 10,
|
||||
format: LevelFormat.BULLET,
|
||||
text: "test",
|
||||
alignment: AlignmentType.BOTH,
|
||||
start: 3,
|
||||
style: { run: {}, paragraph: {} },
|
||||
suffix: LevelSuffix.SPACE,
|
||||
}),
|
||||
).to.throw();
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user