mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 16:10:59 -07:00
Refresh hooks when refreshing extensions. (#14918)
This commit is contained in:
committed by
GitHub
parent
977248e095
commit
126c32aca4
@@ -127,10 +127,7 @@ describe('HookSystem Integration', () => {
|
||||
'Hook system initialized successfully',
|
||||
);
|
||||
|
||||
// Verify system is initialized
|
||||
const status = hookSystem.getStatus();
|
||||
expect(status.initialized).toBe(true);
|
||||
// Note: totalHooks might be 0 if hook validation rejects the test hooks
|
||||
expect(hookSystem.getAllHooks().length).toBe(1);
|
||||
});
|
||||
|
||||
it('should not initialize twice', async () => {
|
||||
@@ -204,12 +201,6 @@ describe('HookSystem Integration', () => {
|
||||
});
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it('should throw error when not initialized', () => {
|
||||
expect(() => hookSystem.getEventHandler()).toThrow(
|
||||
'Hook system not initialized',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('hook execution', () => {
|
||||
@@ -261,24 +252,6 @@ describe('HookSystem Integration', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('system management', () => {
|
||||
it('should return correct status when initialized', async () => {
|
||||
await hookSystem.initialize();
|
||||
|
||||
const status = hookSystem.getStatus();
|
||||
|
||||
expect(status.initialized).toBe(true);
|
||||
// Note: totalHooks might be 0 if hook validation rejects the test hooks
|
||||
expect(typeof status.totalHooks).toBe('number');
|
||||
});
|
||||
|
||||
it('should return uninitialized status', () => {
|
||||
const status = hookSystem.getStatus();
|
||||
|
||||
expect(status.initialized).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('hook disabling via settings', () => {
|
||||
it('should not execute disabled hooks from settings', async () => {
|
||||
// Create config with two hooks, one enabled and one disabled via settings
|
||||
|
||||
Reference in New Issue
Block a user