Add hyperlink cache test
This commit is contained in:
@ -148,6 +148,14 @@ describe("File", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("#HyperlinkCache", () => {
|
||||||
|
it("should initially have empty hyperlink cache", () => {
|
||||||
|
const file = new File();
|
||||||
|
|
||||||
|
expect(file.HyperlinkCache).to.deep.equal({});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("#createFootnote", () => {
|
describe("#createFootnote", () => {
|
||||||
it("should create footnote", () => {
|
it("should create footnote", () => {
|
||||||
const wrapper = new File({
|
const wrapper = new File({
|
||||||
|
@ -61,7 +61,7 @@ export class File {
|
|||||||
private readonly contentTypes: ContentTypes;
|
private readonly contentTypes: ContentTypes;
|
||||||
private readonly appProperties: AppProperties;
|
private readonly appProperties: AppProperties;
|
||||||
private readonly styles: Styles;
|
private readonly styles: Styles;
|
||||||
private readonly hyperlinkCache: { readonly [key: string]: Hyperlink };
|
private readonly hyperlinkCache: { readonly [key: string]: Hyperlink } = {};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
options: IPropertiesOptions = {
|
options: IPropertiesOptions = {
|
||||||
|
Reference in New Issue
Block a user