MCPcopy Create free account
hub / github.com/cloudflare/computer / fakeGit

Function fakeGit

packages/computer/src/git/clone.test.ts:20–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18type CheckoutArgs = Parameters<IsomorphicGitClient["checkout"]>[0];
19
20function fakeGit() {
21 const cloneCalls: CloneArgs[] = [];
22 const checkoutCalls: CheckoutArgs[] = [];
23 const git: IsomorphicGitClient = {
24 clone: vi.fn(async (args: CloneArgs) => {
25 cloneCalls.push(args);
26 }),
27 checkout: vi.fn(async (args: CheckoutArgs) => {
28 checkoutCalls.push(args);
29 }),
30 };
31 return { git, cloneCalls, checkoutCalls };
32}
33
34// FsClient and HttpClient are opaque collaborators for cloneWith;
35// it never inspects them, only forwards.

Callers 1

clone.test.tsFile · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected