mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 18:11:02 -07:00
chore: Extract '.gemini' to GEMINI_DIR constant (#10540)
Co-authored-by: Richie Foreman <richie.foreman@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7beaa368a9
commit
518caae62e
@@ -32,7 +32,7 @@ vi.mock('@google/gemini-cli-core', () => ({
|
||||
getWorkspaceSettingsPath: () => '/tmp/gemini/workspace-settings.json',
|
||||
getProjectTempDir: () => '/test/home/.gemini/tmp/mocked_hash',
|
||||
})),
|
||||
GEMINI_CONFIG_DIR: '.gemini',
|
||||
GEMINI_DIR: '.gemini',
|
||||
getErrorMessage: (e: unknown) => (e instanceof Error ? e.message : String(e)),
|
||||
}));
|
||||
vi.mock('@modelcontextprotocol/sdk/client/index.js');
|
||||
|
||||
@@ -11,6 +11,7 @@ import { removeCommand } from './remove.js';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import * as os from 'node:os';
|
||||
import { GEMINI_DIR } from '@google/gemini-cli-core';
|
||||
|
||||
vi.mock('fs/promises', () => ({
|
||||
readFile: vi.fn(),
|
||||
@@ -80,7 +81,7 @@ describe('mcp remove command', () => {
|
||||
vi.restoreAllMocks();
|
||||
|
||||
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'mcp-remove-test-'));
|
||||
settingsDir = path.join(tempDir, '.gemini');
|
||||
settingsDir = path.join(tempDir, GEMINI_DIR);
|
||||
settingsPath = path.join(settingsDir, 'settings.json');
|
||||
fs.mkdirSync(settingsDir, { recursive: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user