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

Function makeApp

src/quickAddApi.test.ts:144–158  ·  view source on GitHub ↗
(overrides: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

142type FakeFile = { path: string; basename?: string };
143
144function 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
160function makeChoiceExecutor() {
161 return {

Callers 3

getApiFunction · 0.70
fileCacheAppFunction · 0.70

Calls 1

fnMethod · 0.80

Tested by

no test coverage detected