MCPcopy Create free account
hub / github.com/chhoumann/quickadd / withTemplateFile

Function withTemplateFile

src/cli/registerQuickAddCliHandlers.test.ts:285–296  ·  view source on GitHub ↗
(plugin: QuickAdd, existingPath: string)

Source from the content-addressed store, hash-verified

283 });
284
285 function withTemplateFile(plugin: QuickAdd, existingPath: string) {
286 (plugin as unknown as { app: unknown }).app = {
287 vault: {
288 getAbstractFileByPath: vi.fn((path: string) => {
289 if (path !== existingPath) return null;
290 const file = new TFile();
291 file.path = path;
292 return file;
293 }),
294 },
295 };
296 }
297
298 it("returns an error when run-template is given no path", async () => {
299 const { plugin, handlers } = createPlugin([]);

Calls 1

fnMethod · 0.80

Tested by

no test coverage detected