Add ability to add multiple text runs to a bookmark

This commit is contained in:
Dolan
2020-01-01 22:54:42 +00:00
parent 9c11653313
commit db7c4da609
7 changed files with 44 additions and 13 deletions

View File

@ -5,7 +5,7 @@ import { Formatter } from "export/formatter";
import { File } from "./file";
import { Footer, Header } from "./header";
import { HyperlinkRef, Paragraph } from "./paragraph";
import { HyperlinkRef, HyperlinkType, Paragraph } from "./paragraph";
import { Table, TableCell, TableRow } from "./table";
import { TableOfContents } from "./table-of-contents";
@ -241,6 +241,20 @@ describe("File", () => {
expect(spy.called).to.equal(true);
});
it.only("should create hyperlinks", () => {
const wrapper = new File({
hyperlinks: {
myHyperLink: {
link: "test.com",
text: "test",
type: HyperlinkType.EXTERNAL,
},
},
});
expect(wrapper.HyperlinkCache.myHyperLink).to.not.be.undefined("");
});
});
describe("#HyperlinkCache", () => {