Improve tests

This commit is contained in:
Dolan
2021-03-13 19:53:36 +00:00
parent 8aa804db18
commit cc9a966f53
3 changed files with 22 additions and 10 deletions

View File

@ -24,6 +24,18 @@ describe("PageBorders", () => {
expect(tree["w:pgBorders"]).to.deep.equal({ _attr: { "w:display": "firstPage" } });
});
it("should create page borders with default configuration", () => {
const properties = new PageBorders({});
const tree = new Formatter().format(properties);
expect(Object.keys(tree)).to.deep.equal(["w:pgBorders"]);
expect(tree).to.deep.equal({
"w:pgBorders": {
_attr: {},
},
});
});
it("should create page borders with full configuration", () => {
const properties = new PageBorders({
pageBorders: {