MCPcopy
hub / github.com/anomalyco/opencode / each

Function each

packages/opencode/test/tool/shell.test.ts:155–162  ·  view source on GitHub ↗
(
  name: string,
  fn: (item: { label: string; shell: string }) => Effect.Effect<void, unknown, ShellTestServices>,
)

Source from the content-addressed store, hash-verified

153 )
154
155const each = (
156 name: string,
157 fn: (item: { label: string; shell: string }) => Effect.Effect<void, unknown, ShellTestServices>,
158) => {
159 for (const item of shells) {
160 it.live(`${name} [${item.label}]`, () => withShell(item, fn(item)))
161 }
162}
163
164const capture = (requests: Array<Omit<PermissionV1.Request, "id" | "sessionID" | "tool">>, stop?: Error) => ({
165 ...ctx,

Callers 1

shell.test.tsFile · 0.85

Calls 2

withShellFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected