diff --git a/src/file/document/body/section-properties/title-page/title-page.spec.ts b/src/file/document/body/section-properties/title-page/title-page.spec.ts new file mode 100644 index 0000000000..75374a22db --- /dev/null +++ b/src/file/document/body/section-properties/title-page/title-page.spec.ts @@ -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" } }); + }); + }); +}); diff --git a/src/file/document/body/section-properties/title-page/title-page.ts b/src/file/document/body/section-properties/title-page/title-page.ts index 361cc039fa..743c6ee489 100644 --- a/src/file/document/body/section-properties/title-page/title-page.ts +++ b/src/file/document/body/section-properties/title-page/title-page.ts @@ -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() { diff --git a/src/file/paragraph/run/pagenumber.ts b/src/file/paragraph/run/page-number.ts similarity index 100% rename from src/file/paragraph/run/pagenumber.ts rename to src/file/paragraph/run/page-number.ts diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index 508aad9afa..3123f98cd2 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -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";