chore: fix format

This commit is contained in:
Ralph Khreish
2025-07-11 14:13:00 +03:00
parent fff2172a30
commit ee2d9921c2
3 changed files with 24 additions and 10 deletions

View File

@@ -558,7 +558,9 @@ describe('getConfig Tests', () => {
expect(config).toEqual(DEFAULT_CONFIG); expect(config).toEqual(DEFAULT_CONFIG);
expect(mockFindProjectRoot).not.toHaveBeenCalled(); // Explicit root provided expect(mockFindProjectRoot).not.toHaveBeenCalled(); // Explicit root provided
// The implementation checks for .taskmaster directory first // The implementation checks for .taskmaster directory first
expect(fsExistsSyncSpy).toHaveBeenCalledWith(path.join(MOCK_PROJECT_ROOT, '.taskmaster')); expect(fsExistsSyncSpy).toHaveBeenCalledWith(
path.join(MOCK_PROJECT_ROOT, '.taskmaster')
);
expect(fsReadFileSyncSpy).not.toHaveBeenCalled(); // No read if file doesn't exist expect(fsReadFileSyncSpy).not.toHaveBeenCalled(); // No read if file doesn't exist
expect(consoleWarnSpy).toHaveBeenCalledWith( expect(consoleWarnSpy).toHaveBeenCalledWith(
expect.stringContaining('not found at provided project root') expect.stringContaining('not found at provided project root')

View File

@@ -268,7 +268,7 @@ describe('analyzeTaskComplexity', () => {
// Mock findTaskById to return the expected structure // Mock findTaskById to return the expected structure
findTaskById.mockImplementation((tasks, taskId) => { findTaskById.mockImplementation((tasks, taskId) => {
const task = tasks?.find(t => t.id === parseInt(taskId)); const task = tasks?.find((t) => t.id === parseInt(taskId));
return { task: task || null, originalSubtaskCount: null }; return { task: task || null, originalSubtaskCount: null };
}); });

View File

@@ -258,9 +258,15 @@ describe('initTaskMaster', () => {
const taskMaster = initTaskMaster({}); const taskMaster = initTaskMaster({});
// Assert - Should return absolute paths with default locations // Assert - Should return absolute paths with default locations
expect(taskMaster.getTasksPath()).toBe(path.join(tempDir, TASKMASTER_TASKS_FILE)); expect(taskMaster.getTasksPath()).toBe(
expect(taskMaster.getConfigPath()).toBe(path.join(tempDir, TASKMASTER_CONFIG_FILE)); path.join(tempDir, TASKMASTER_TASKS_FILE)
expect(taskMaster.getStatePath()).toBe(path.join(tempDir, TASKMASTER_DIR, 'state.json')); );
expect(taskMaster.getConfigPath()).toBe(
path.join(tempDir, TASKMASTER_CONFIG_FILE)
);
expect(taskMaster.getStatePath()).toBe(
path.join(tempDir, TASKMASTER_DIR, 'state.json')
);
}); });
}); });
@@ -416,9 +422,15 @@ describe('initTaskMaster', () => {
expect(taskMaster.getProjectRoot()).toBe(tempDir); expect(taskMaster.getProjectRoot()).toBe(tempDir);
expect(taskMaster.getTaskMasterDir()).toBe(taskMasterDir); expect(taskMaster.getTaskMasterDir()).toBe(taskMasterDir);
// Default paths are always set for tasks, config, and state // Default paths are always set for tasks, config, and state
expect(taskMaster.getTasksPath()).toBe(path.join(tempDir, TASKMASTER_TASKS_FILE)); expect(taskMaster.getTasksPath()).toBe(
expect(taskMaster.getConfigPath()).toBe(path.join(tempDir, TASKMASTER_CONFIG_FILE)); path.join(tempDir, TASKMASTER_TASKS_FILE)
expect(taskMaster.getStatePath()).toBe(path.join(taskMasterDir, 'state.json')); );
expect(taskMaster.getConfigPath()).toBe(
path.join(tempDir, TASKMASTER_CONFIG_FILE)
);
expect(taskMaster.getStatePath()).toBe(
path.join(taskMasterDir, 'state.json')
);
// PRD and complexity report paths are undefined when not provided // PRD and complexity report paths are undefined when not provided
expect(taskMaster.getPrdPath()).toBeUndefined(); expect(taskMaster.getPrdPath()).toBeUndefined();
expect(taskMaster.getComplexityReportPath()).toBeUndefined(); expect(taskMaster.getComplexityReportPath()).toBeUndefined();