MCPcopy Create free account
hub / github.com/cortexkit/magic-context / makeHarness

Function makeHarness

packages/cli/src/commands/doctor-opencode.test.ts:115–127  ·  view source on GitHub ↗
(database: Database, messages: string[])

Source from the content-addressed store, hash-verified

113}
114
115function makeHarness(database: Database, messages: string[]) {
116 return {
117 name: "test",
118 openDatabase: () => database,
119 closeDatabase: () => {},
120 log: {
121 info: (message: string) => messages.push(`info:${message}`),
122 success: (message: string) => messages.push(`success:${message}`),
123 warn: (message: string) => messages.push(`warn:${message}`),
124 error: (message: string) => messages.push(`error:${message}`),
125 },
126 };
127}
128
129afterEach(() => {
130 if (originalXdgCacheHome === undefined) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected