mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 21:44:25 -07:00
feat(core,cli): enforce mandatory MessageBus injection (Phase 3 Hard Migration) (#15776)
This commit is contained in:
@@ -8,6 +8,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { ActivateSkillTool } from './activate-skill.js';
|
||||
import type { Config } from '../config/config.js';
|
||||
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
||||
import { createMockMessageBus } from '../test-utils/mock-message-bus.js';
|
||||
|
||||
vi.mock('../utils/getFolderStructure.js', () => ({
|
||||
getFolderStructure: vi.fn().mockResolvedValue('Mock folder structure'),
|
||||
@@ -16,13 +17,10 @@ vi.mock('../utils/getFolderStructure.js', () => ({
|
||||
describe('ActivateSkillTool', () => {
|
||||
let mockConfig: Config;
|
||||
let tool: ActivateSkillTool;
|
||||
const mockMessageBus = {
|
||||
publish: vi.fn(),
|
||||
subscribe: vi.fn(),
|
||||
unsubscribe: vi.fn(),
|
||||
} as unknown as MessageBus;
|
||||
let mockMessageBus: MessageBus;
|
||||
|
||||
beforeEach(() => {
|
||||
mockMessageBus = createMockMessageBus();
|
||||
const skills = [
|
||||
{
|
||||
name: 'test-skill',
|
||||
|
||||
Reference in New Issue
Block a user