mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-30 06:12:05 +00:00
ralph/chore/fix.tests (#1578)
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:unit": "vitest run -t unit",
|
||||
"test:integration": "vitest run -t integration",
|
||||
"test:unit": "vitest run '**/*.spec.ts'",
|
||||
"test:integration": "vitest run '**/*.test.ts'",
|
||||
"test:e2e": "vitest run --dir tests/e2e",
|
||||
"test:ci": "vitest run --coverage --reporter=dot"
|
||||
},
|
||||
|
||||
@@ -77,8 +77,8 @@ describe('LoopCommand', () => {
|
||||
mockTmCore = {
|
||||
loop: {
|
||||
run: mockLoopRun,
|
||||
checkSandboxAuth: vi.fn().mockReturnValue(true),
|
||||
runInteractiveAuth: vi.fn(),
|
||||
checkSandboxAuth: vi.fn().mockReturnValue({ ready: true }),
|
||||
runInteractiveAuth: vi.fn().mockReturnValue({ success: true }),
|
||||
resolveIterations: vi.fn().mockImplementation((opts) => {
|
||||
// Mirror the real implementation logic for accurate testing
|
||||
if (opts.userIterations !== undefined) return opts.userIterations;
|
||||
@@ -400,7 +400,7 @@ describe('LoopCommand', () => {
|
||||
});
|
||||
|
||||
it('should run interactive auth when sandbox not ready', async () => {
|
||||
mockTmCore.loop.checkSandboxAuth.mockReturnValue(false);
|
||||
mockTmCore.loop.checkSandboxAuth.mockReturnValue({ ready: false });
|
||||
const result = createMockResult();
|
||||
mockLoopRun.mockResolvedValue(result);
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:unit": "vitest run -t unit",
|
||||
"test:integration": "vitest run -t integration",
|
||||
"test:unit": "vitest run '**/*.spec.ts'",
|
||||
"test:integration": "vitest run '**/*.test.ts'",
|
||||
"test:ci": "vitest run --coverage --reporter=dot"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -158,7 +158,7 @@ describe('generate MCP tool', () => {
|
||||
const response = callMCPTool('generate', { projectRoot: testDir });
|
||||
|
||||
expect(response.data.orphanedFilesRemoved).toBe(1);
|
||||
}, 15000);
|
||||
}, 30000); // Longer timeout: this test makes 2 MCP calls (generate, then regenerate)
|
||||
|
||||
it('should accept output parameter for custom directory', () => {
|
||||
const testData = createTasksFile({
|
||||
|
||||
Reference in New Issue
Block a user