MCPcopy
hub / github.com/continuedev/continue / MockRegistry

Class MockRegistry

packages/config-yaml/src/load/injectBlocks.test.ts:7–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6// Mock Registry for testing
7class MockRegistry implements Registry {
8 private content: Record<string, string> = {};
9
10 setContent(id: string, content: string) {
11 this.content[id] = content;
12 }
13
14 async getContent(id: PackageIdentifier): Promise<string> {
15 const key =
16 id.uriType === "file"
17 ? id.fileUri
18 : `${id.fullSlug.ownerSlug}/${id.fullSlug.packageSlug}`;
19 if (this.content[key]) {
20 return this.content[key];
21 }
22 throw new Error(`Content not found for ${key}`);
23 }
24}
25
26describe("injectBlocks with input-to-secret conversion", () => {
27 let mockRegistry: MockRegistry;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected