mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Refactor git subcommands to accept a git instance
This commit is contained in:
23 files changed
+581
-413
No files matched your search
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user