(overrides: Record<string, unknown> = {})
| 142 | type FakeFile = { path: string; basename?: string }; |
| 143 | |
| 144 | function makeApp(overrides: Record<string, unknown> = {}) { |
| 145 | return { |
| 146 | workspace: { |
| 147 | getActiveViewOfType: vi.fn(() => undefined), |
| 148 | }, |
| 149 | vault: { |
| 150 | getMarkdownFiles: vi.fn(() => [] as FakeFile[]), |
| 151 | read: vi.fn(async () => ""), |
| 152 | }, |
| 153 | metadataCache: { |
| 154 | getFileCache: vi.fn(() => undefined), |
| 155 | }, |
| 156 | ...overrides, |
| 157 | } as unknown as App; |
| 158 | } |
| 159 | |
| 160 | function makeChoiceExecutor() { |
| 161 | return { |
no test coverage detected