#532 Make hyperlinks work on the Header and Footer

This commit is contained in:
Dolan Miu
2021-03-01 03:28:35 +00:00
parent 655b40d418
commit c6e9696be0
9 changed files with 53 additions and 36 deletions

View File

@ -5,7 +5,7 @@ import { stub } from "sinon";
import { Formatter } from "export/formatter";
import { EMPTY_OBJECT } from "file/xml-components";
import { File } from "../file";
import { IViewWrapper } from "../document-wrapper";
import { ShadingType } from "../table/shading";
import { AlignmentType, HeadingLevel, LeaderType, PageBreak, TabStopPosition, TabStopType } from "./formatting";
import { Bookmark, ExternalHyperlink } from "./links";
@ -804,12 +804,10 @@ describe("Paragraph", () => {
],
});
const fileMock = ({
Document: {
Relationships: {
createRelationship: () => ({}),
},
Relationships: {
createRelationship: () => ({}),
},
} as unknown) as File;
} as unknown) as IViewWrapper;
paragraph.prepForXml(fileMock);
const tree = new Formatter().format(paragraph);
expect(tree).to.deep.equal({