#2388 - Add default tab stop (#2470)

* #2388 - Check for undefined rather than falsey

* Add default tab stop

* Add back tab stop positions

* Add test for default tab stop
This commit is contained in:
Dolan
2023-12-24 03:37:36 +00:00
committed by GitHub
parent abbd695a8f
commit 2bd4aacdd5
6 changed files with 29 additions and 3 deletions

View File

@ -112,6 +112,23 @@ describe("Settings", () => {
});
});
it("should add defaultTabStop setting with version", () => {
const settings = new Settings({
defaultTabStop: 100,
});
const tree = new Formatter().format(settings);
expect(Object.keys(tree)).has.length(1);
expect(tree["w:settings"]).to.be.an("array");
expect(tree["w:settings"]).to.deep.include({
"w:defaultTabStop": {
_attr: {
"w:val": 100,
},
},
});
});
// TODO: Remove when deprecating compatibilityModeVersion
it("should add compatibility setting with legacy version", () => {
const settings = new Settings({