mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
chore(test): install and configure vitest eslint plugin (#3228)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
@@ -720,19 +720,23 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
||||
// 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('should correctly use mocked homedir for global path', async () => {
|
||||
it.skip('should correctly use mocked homedir for global path', async () => {
|
||||
const MOCK_GEMINI_DIR_LOCAL = path.join('/mock/home/user', '.gemini');
|
||||
const MOCK_GLOBAL_PATH_LOCAL = path.join(MOCK_GEMINI_DIR_LOCAL, 'GEMINI.md');
|
||||
const MOCK_GLOBAL_PATH_LOCAL = path.join(
|
||||
MOCK_GEMINI_DIR_LOCAL,
|
||||
'GEMINI.md',
|
||||
);
|
||||
mockFs({
|
||||
[MOCK_GLOBAL_PATH_LOCAL]: { type: 'file', content: 'GlobalContentOnly' }
|
||||
[MOCK_GLOBAL_PATH_LOCAL]: { type: 'file', content: 'GlobalContentOnly' },
|
||||
});
|
||||
const memory = await loadHierarchicalGeminiMemory("/some/other/cwd", false);
|
||||
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');
|
||||
expect(fsPromises.readFile).toHaveBeenCalledWith(
|
||||
MOCK_GLOBAL_PATH_LOCAL,
|
||||
'utf-8',
|
||||
);
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
describe('mergeMcpServers', () => {
|
||||
@@ -1294,7 +1298,7 @@ describe('loadCliConfig with allowed-mcp-server-names', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should override allowMCPServers with excludeMCPServers if overlapping ', async () => {
|
||||
it('should override allowMCPServers with excludeMCPServers if overlapping', async () => {
|
||||
process.argv = ['node', 'script.js'];
|
||||
const argv = await parseArguments();
|
||||
const settings: Settings = {
|
||||
@@ -1308,7 +1312,7 @@ describe('loadCliConfig with allowed-mcp-server-names', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should prioritize mcp server flag if set ', async () => {
|
||||
it('should prioritize mcp server flag if set', async () => {
|
||||
process.argv = [
|
||||
'node',
|
||||
'script.js',
|
||||
|
||||
Reference in New Issue
Block a user