MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / deps

Function deps

__tests__/remove-binary.test.ts:146–161  ·  view source on GitHub ↗
(over: Partial<RemoveBinaryDeps> & { rmFails?: Set<string>; calls?: string[] })

Source from the content-addressed store, hash-verified

144
145describe('executeBinaryRemoval', () => {
146 function deps(over: Partial<RemoveBinaryDeps> & { rmFails?: Set<string>; calls?: string[] }): RemoveBinaryDeps & { calls: string[] } {
147 const calls = over.calls ?? [];
148 const rmFails = over.rmFails ?? new Set<string>();
149 return {
150 platform: 'linux',
151 execPath: '/usr/bin/node',
152 rm: (p) => {
153 if (rmFails.has(p)) { rmFails.delete(p); throw new Error('EBUSY'); }
154 calls.push(`rm ${p}`);
155 },
156 rename: (from, to) => calls.push(`mv ${from} ${to}`),
157 run: (cmd, args) => { calls.push(`run ${cmd} ${args.join(' ')}`); return 0; },
158 calls,
159 ...over,
160 };
161 }
162
163 const plan = (over: Partial<BinaryRemovalPlan> = {}): BinaryRemovalPlan => ({
164 paths: [],

Callers 1

Calls 2

hasMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected