Add setting for not justify lines ending in soft line break

This commit is contained in:
fmuscolino
2019-03-05 17:17:06 +01:00
parent 4580a65a84
commit b179facca2
4 changed files with 80 additions and 0 deletions

View File

@ -60,4 +60,25 @@ describe("Settings", () => {
assertSettingsWithUpdateFields(settings);
});
});
describe("#addCompatibility", () => {
it("should add an empty Compatibility", () => {
const settings = new Settings();
settings.addCompatibility();
const tree = new Formatter().format(settings);
let keys: string[] = Object.keys(tree);
expect(keys[0]).to.be.equal("w:settings");
const rootArray = tree["w:settings"];
expect(rootArray).is.an.instanceof(Array);
expect(rootArray).has.length(2);
keys = Object.keys(rootArray[0]);
expect(keys).is.an.instanceof(Array);
expect(keys).has.length(1);
expect(keys[0]).to.be.equal("_attr");
keys = Object.keys(rootArray[1]);
expect(keys).is.an.instanceof(Array);
expect(keys).has.length(1);
expect(keys[0]).to.be.equal("w:compat");
});
});
});