Use single media instead of multiple

This commit is contained in:
Dolan
2018-10-23 00:31:51 +01:00
parent a5bedf9a5b
commit 9c66db97ff
8 changed files with 49 additions and 44 deletions

View File

@ -3,12 +3,15 @@ import { expect } from "chai";
import { Formatter } from "../../../../export/formatter";
import { FooterWrapper } from "../../../footer-wrapper";
import { HeaderWrapper } from "../../../header-wrapper";
import { Media } from "../../../media";
import { PageBorderOffsetFrom, PageNumberFormat } from "./";
import { SectionProperties } from "./section-properties";
describe("SectionProperties", () => {
describe("#constructor()", () => {
it("should create section properties with options", () => {
const media = new Media();
const properties = new SectionProperties({
width: 11906,
height: 16838,
@ -23,10 +26,10 @@ describe("SectionProperties", () => {
space: 708,
linePitch: 360,
headers: {
default: new HeaderWrapper(100),
default: new HeaderWrapper(media, 100),
},
footers: {
even: new FooterWrapper(200),
even: new FooterWrapper(media, 200),
},
pageNumberStart: 10,
pageNumberFormatType: PageNumberFormat.CARDINAL_TEXT,