mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
chore(tests): remove obsolete test for hierarchical memory (#13122)
This commit is contained in:
@@ -702,39 +702,6 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
|||||||
undefined, // maxDirs
|
undefined, // maxDirs
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// NOTE TO FUTURE DEVELOPERS:
|
|
||||||
// To re-enable tests for loadHierarchicalGeminiMemory, ensure that:
|
|
||||||
// 1. os.homedir() is reliably mocked *before* the config.ts module is loaded
|
|
||||||
// and its functions (which use os.homedir()) are called.
|
|
||||||
// 2. fs/promises and fs mocks correctly simulate file/directory existence,
|
|
||||||
// readability, and content based on paths derived from the mocked os.homedir().
|
|
||||||
// 3. Spies on console functions (for logger output) are correctly set up if needed.
|
|
||||||
// Example of a previously failing test structure:
|
|
||||||
it.skip('should correctly use mocked homedir for global path', async () => {
|
|
||||||
// This test is skipped because mockFs and fsPromises are not properly imported/mocked
|
|
||||||
// TODO: Fix this test by properly setting up mock-fs and fs/promises mocks
|
|
||||||
/*
|
|
||||||
const MOCK_GEMINI_DIR_LOCAL = path.join(
|
|
||||||
'/mock/home/user',
|
|
||||||
ServerConfig.GEMINI_DIR,
|
|
||||||
);
|
|
||||||
const MOCK_GLOBAL_PATH_LOCAL = path.join(
|
|
||||||
MOCK_GEMINI_DIR_LOCAL,
|
|
||||||
'GEMINI.md',
|
|
||||||
);
|
|
||||||
mockFs({
|
|
||||||
[MOCK_GLOBAL_PATH_LOCAL]: { type: 'file', content: 'GlobalContentOnly' },
|
|
||||||
});
|
|
||||||
const memory = await loadHierarchicalGeminiMemory('/some/other/cwd', false);
|
|
||||||
expect(memory).toBe('GlobalContentOnly');
|
|
||||||
expect(vi.mocked(os.homedir)).toHaveBeenCalled();
|
|
||||||
expect(fsPromises.readFile).toHaveBeenCalledWith(
|
|
||||||
MOCK_GLOBAL_PATH_LOCAL,
|
|
||||||
'utf-8',
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('mergeMcpServers', () => {
|
describe('mergeMcpServers', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user