2023-06-05 00:33:43 +01:00
|
|
|
import { describe, expect, it } from "vitest";
|
2022-06-26 23:26:42 +01:00
|
|
|
|
|
|
|
import { Formatter } from "@export/formatter";
|
|
|
|
|
2020-10-07 11:44:23 +02:00
|
|
|
import { DeletedNumberOfPages, DeletedNumberOfPagesSection, DeletedPage } from "./deleted-page-number";
|
|
|
|
|
|
|
|
describe("Deleted Page", () => {
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("uses the font name for both ascii and hAnsi", () => {
|
|
|
|
const tree = new Formatter().format(new DeletedPage());
|
|
|
|
expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "PAGE"] });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2022-07-04 14:51:36 +01:00
|
|
|
describe("Deleted NumberOfPages", () => {
|
2020-10-07 11:44:23 +02:00
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("uses the font name for both ascii and hAnsi", () => {
|
|
|
|
const tree = new Formatter().format(new DeletedNumberOfPages());
|
|
|
|
expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "NUMPAGES"] });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Deleted NumberOfPagesSection", () => {
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("uses the font name for both ascii and hAnsi", () => {
|
|
|
|
const tree = new Formatter().format(new DeletedNumberOfPagesSection());
|
|
|
|
expect(tree).to.deep.equal({ "w:delInstrText": [{ _attr: { "xml:space": "preserve" } }, "SECTIONPAGES"] });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|