MCPcopy
hub / github.com/affaan-m/ECC / createFailingShell

Function createFailingShell

tests/opencode-plugin-hooks.test.js:52–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52function createFailingShell() {
53 const calls = []
54 const shell = (strings, ...values) => {
55 calls.push(String.raw({ raw: strings }, ...values))
56 const error = new Error("OpenCode plugin file probes must not use shell commands")
57 return {
58 then: (_resolve, reject) => reject(error),
59 text: async () => {
60 throw error
61 },
62 }
63 }
64 shell.calls = calls
65 return shell
66}
67
68async function withTempProject(files, fn) {
69 const projectDir = fs.mkdtempSync(path.join(os.tmpdir(), "ecc-opencode-plugin-"))

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected