(cache: unknown, content: string)
| 5 | import {MetaType} from "./Types/metaType"; |
| 6 | |
| 7 | const createParser = (cache: unknown, content: string): MetaEditParser => { |
| 8 | const app = { |
| 9 | metadataCache: { |
| 10 | getFileCache: vi.fn().mockReturnValue(cache), |
| 11 | }, |
| 12 | vault: { |
| 13 | cachedRead: vi.fn().mockResolvedValue(content), |
| 14 | }, |
| 15 | }; |
| 16 | |
| 17 | return new MetaEditParser(app as any); |
| 18 | }; |
| 19 | |
| 20 | // Inline parsing is pure: drive it directly with a string so the many edge |
| 21 | // cases read clearly. |