| 5 | |
| 6 | // Mock Registry for testing |
| 7 | class 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 | |
| 26 | describe("injectBlocks with input-to-secret conversion", () => { |
| 27 | let mockRegistry: MockRegistry; |
nothing calls this directly
no outgoing calls
no test coverage detected