paragraph: add support for page break before format property

This commit is contained in:
Igor Bulovski
2018-05-10 19:43:58 +02:00
parent 84e298e7ee
commit cbe9c3ac50
4 changed files with 40 additions and 2 deletions

View File

@ -161,6 +161,22 @@ describe("Paragraph", () => {
});
});
describe("#pageBreakBefore()", () => {
it("should add page break before to JSON", () => {
paragraph.pageBreakBefore();
const tree = new Formatter().format(paragraph);
expect(tree).to.deep.equal({
"w:p": [
{
"w:pPr": [{
"w:pageBreakBefore": []
}],
}
],
});
});
});
describe("#bullet()", () => {
it("should add list paragraph style to JSON", () => {
paragraph.bullet();