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

Function makeRepo

__tests__/git-changed-untracked-dir.test.ts:24–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 const dirs: string[] = [];
23
24 function makeRepo(): string {
25 const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-1213-'));
26 dirs.push(dir);
27 git(dir, ['init']);
28 git(dir, ['config', 'user.email', 'test@example.com']);
29 git(dir, ['config', 'user.name', 'test']);
30 fs.writeFileSync(path.join(dir, 'root.js'), 'function foo() {}\n');
31 git(dir, ['add', 'root.js']);
32 git(dir, ['commit', '-m', 'init']);
33 return dir;
34 }
35
36 afterEach(() => {
37 while (dirs.length) {

Calls 3

pushMethod · 0.80
gitFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected