chore: fix unit tests

This commit is contained in:
Ralph Khreish
2025-07-11 14:06:22 +03:00
parent 5fa7d2ecaa
commit fff2172a30
3 changed files with 20 additions and 10 deletions

View File

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