MCPcopy Index your code
hub / github.com/anomalyco/opencode / withTestInstance

Function withTestInstance

packages/opencode/test/fixture/fixture.ts:40–42  ·  view source on GitHub ↗
(input: { directory: string; fn: (ctx: InstanceContext) => R })

Source from the content-addressed store, hash-verified

38}
39
40export async function withTestInstance<R>(input: { directory: string; fn: (ctx: InstanceContext) => R }) {
41 return input.fn(await InstanceRuntime.load({ directory: input.directory }))
42}
43
44export async function reloadTestInstance(input: { directory: string }) {
45 return InstanceRuntime.reloadInstance(input)

Callers 2

client.test.tsFile · 0.90
checkFunction · 0.90

Calls

no outgoing calls

Tested by 1

checkFunction · 0.72