Refactor git subcommands to accept a git instance

This commit is contained in:
Alex Gleason committed 2025-09-14 17:15:07 -05:00
1 parent 772a2f424b
commit 1ab895bd59
23 files changed
+581 -413

No files matched your search

+4 -1
View File
@@ -1,5 +1,6 @@
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { ShellTool } from './ShellTool';
import { Git } from '../git';
import type { JSRuntimeFS } from '../JSRuntime';
// Mock filesystem
@@ -19,12 +20,14 @@ const createMockFS = (): JSRuntimeFS => ({
describe('ShellTool', () => {
let mockFS: JSRuntimeFS;
let mockGit: Git;
let shellTool: ShellTool;
const testCwd = '/test/dir';
beforeEach(() => {
mockFS = createMockFS();
shellTool = new ShellTool(mockFS, testCwd);
mockGit = new Git(mockFS);
shellTool = new ShellTool(mockFS, testCwd, mockGit);
});
it('should have correct tool properties', () => {