(files: Record<string, TFile> = {})
| 31 | } |
| 32 | |
| 33 | function createApp(files: Record<string, TFile> = {}): any { |
| 34 | return { |
| 35 | metadataCache: { |
| 36 | fileToLinktext: (targetFile: TFile) => targetFile.path.replace(/\.md$/i, ""), |
| 37 | getFirstLinkpathDest: (linkPath: string) => |
| 38 | files[linkPath] ?? files[`${linkPath}.md`] ?? null, |
| 39 | getCache: () => ({}), |
| 40 | }, |
| 41 | workspace: { |
| 42 | getLeaf: () => ({ openFile: jest.fn() }), |
| 43 | openLinkText: jest.fn(), |
| 44 | trigger: jest.fn(), |
| 45 | }, |
| 46 | fileManager: { |
| 47 | generateMarkdownLink: (targetFile: TFile) => `[${targetFile.basename}](${targetFile.path})`, |
| 48 | }, |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | describe("taskModalSubtasks", () => { |
| 53 | it("filters out the current task and already selected subtasks", () => { |
no outgoing calls
no test coverage detected