We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ac3ac6 commit b7936baCopy full SHA for b7936ba
tests/Task/LinkResolver.test.ts
@@ -44,4 +44,16 @@ describe('LinkResolver', () => {
44
const link2 = new Link(rawLink, link_in_file_body.filePath);
45
expect(link2.destinationPath).toBeNull();
46
});
47
+
48
+ it('resetting global instance affects pre-existing links', () => {
49
+ const globalInstance = LinkResolver.getInstance();
50
+ globalInstance.setGetFirstLinkpathDestFn(() => 'From Global Instance.md');
51
52
+ const link1 = new Link(rawLink, link_in_file_body.filePath);
53
+ expect(link1.destinationPath).toEqual('From Global Instance.md');
54
55
+ globalInstance.resetGetFirstLinkpathDestFn();
56
57
+ expect(link1.destinationPath).toBeNull();
58
+ });
59
0 commit comments