Test contextual spacing

This commit is contained in:
Max Lay
2019-12-12 11:44:00 +13:00
parent e0698554ad
commit b4cce534a5

View File

@ -220,6 +220,32 @@ describe("ParagraphStyle", () => {
});
});
it("#contextualSpacing", () => {
const style = new ParagraphStyle({
id: "myStyleId",
paragraph: {
contextualSpacing: true,
},
});
const tree = new Formatter().format(style);
expect(tree).to.deep.equal({
"w:style": [
{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } },
{
"w:pPr": [
{
"w:contextualSpacing": {
_attr: {
"w:val": 1,
},
},
},
],
},
],
});
});
it("#leftTabStop", () => {
const style = new ParagraphStyle({
id: "myStyleId",