Added tests, renamed pagenumber to page-number

This commit is contained in:
Tyler Bell
2018-05-17 13:32:33 -06:00
parent 0fedfcf709
commit 8d35dc1bb0
4 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,17 @@
import { expect } from "chai";
import { Formatter } from "../../../../../export/formatter";
import { TitlePage } from "./title-page";
describe("PageSize", () => {
describe("#constructor()", () => {
it("should create title page property for different first page header", () => {
const properties = new TitlePage();
const tree = new Formatter().format(properties);
expect(Object.keys(tree)).to.deep.equal(["w:titlePg"]);
expect(tree["w:titlePg"]).to.be.an.instanceof(Array);
expect(tree["w:titlePg"][0]).to.deep.equal({ _attr: { "w:val": "1" } });
});
});
});

View File

@ -1,5 +1,5 @@
import { XmlComponent } from "file/xml-components";
import { TitlePageAttributes } from "./titlepage-attributes";
import { TitlePageAttributes } from "./title-page-attributes";
export class TitlePage extends XmlComponent {
constructor() {

View File

@ -8,7 +8,7 @@ import { SubScript, SuperScript } from "./script";
import { Style } from "./style";
import { Tab } from "./tab";
import { Underline } from "./underline";
import { Begin, Page, End, Separate } from "./pagenumber";
import { Begin, Page, End, Separate } from "./page-number";
import { XmlComponent } from "file/xml-components";