Revert "Move mockTool into test-utils (#7245)" (#7277)

This commit is contained in:
Gal Zahavi
2025-08-27 20:05:47 -07:00
committed by GitHub
parent 539a49bd24
commit 529c2649b8
10 changed files with 21 additions and 15 deletions

View File

@@ -34,7 +34,6 @@
},
"devDependencies": {
"@types/express": "^5.0.3",
"@google/gemini-cli-test-utils": "file:../test-utils",
"@types/fs-extra": "^11.0.4",
"@types/supertest": "^6.0.3",
"@types/tar": "^6.1.13",

View File

@@ -33,7 +33,7 @@ import {
assertTaskCreationAndWorkingStatus,
createStreamMessageRequest,
} from './testing_utils.js';
import { MockTool } from '@google/gemini-cli-test-utils';
import { MockTool } from '@google/gemini-cli-core';
const mockToolConfirmationFn = async () =>
({}) as unknown as ToolCallConfirmationDetails;

View File

@@ -25,10 +25,13 @@ import type {
AnyDeclarativeTool,
AnyToolInvocation,
} from '@google/gemini-cli-core';
import { ToolConfirmationOutcome, ApprovalMode } from '@google/gemini-cli-core';
import {
ToolConfirmationOutcome,
ApprovalMode,
MockTool,
} from '@google/gemini-cli-core';
import type { HistoryItemWithoutId, HistoryItemToolGroup } from '../types.js';
import { ToolCallStatus } from '../types.js';
import { MockTool } from '@google/gemini-cli-test-utils';
// Mocks
vi.mock('@google/gemini-cli-core', async () => {

View File

@@ -106,3 +106,6 @@ export * from './telemetry/index.js';
export { sessionId } from './utils/session.js';
export * from './utils/browser.js';
export { Storage } from './config/storage.js';
// Export test utils
export * from './test-utils/index.js';

View File

@@ -0,0 +1,7 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export * from './mock-tool.js';

View File

@@ -9,12 +9,12 @@ import type {
ToolCallConfirmationDetails,
ToolInvocation,
ToolResult,
} from '@google/gemini-cli-core';
} from '../tools/tools.js';
import {
BaseDeclarativeTool,
BaseToolInvocation,
Kind,
} from '@google/gemini-cli-core';
} from '../tools/tools.js';
type MockToolOptions = {
name: string;

View File

@@ -4,4 +4,4 @@
* SPDX-License-Identifier: Apache-2.0
*/
export * from './src/index.js';
export * from './src/file-system-test-helpers.js';

View File

@@ -10,9 +10,7 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "^5.3.3",
"@google/gemini-cli-core": "file:../core",
"vitest": "^3.1.1"
"typescript": "^5.3.3"
},
"engines": {
"node": ">=20"

View File

@@ -5,4 +5,3 @@
*/
export * from './file-system-test-helpers.js';
export * from './mock-tool.js';