Merge pull request #75 from h4buli/feature/page-break-before

paragraph: add support for 'page break before' format property
This commit is contained in:
Dolan
2018-05-28 02:33:59 +01:00
committed by GitHub
5 changed files with 56 additions and 2 deletions

View File

@ -161,6 +161,24 @@ 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 default to 0 indent level if no bullet was specified", () => {
paragraph.bullet();