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 17ed1fd commit 119a9fcCopy full SHA for 119a9fc
tests/Obsidian/Cache.test.ts
@@ -633,10 +633,12 @@ describe('accessing links in file', function () {
633
});
634
635
it('should access links in frontmatter', () => {
636
+ // Update to Obsidian API 1.4.0 to access cachedMetadata.frontmatterLinks
637
// @ts-expect-error TS2551: Property frontmatterLinks does not exist on type CachedMetadata
638
const frontMatterLinks = cachedMetadata['frontmatterLinks'];
639
+ expect(frontMatterLinks).toBeDefined();
640
- const firstFrontMatterLink = frontMatterLinks[0];
641
+ const firstFrontMatterLink = frontMatterLinks![0];
642
expect(firstFrontMatterLink.original).toEqual('[[link_in_yaml]]');
643
expect(firstFrontMatterLink).toMatchInlineSnapshot(`
644
{
0 commit comments