Refactor: Migrate CLI appEvents to Core coreEvents (#15737)

This commit is contained in:
Adib234
2026-01-23 11:45:46 -05:00
committed by GitHub
parent 0b7d26c9e3
commit 488d5fc439
13 changed files with 90 additions and 93 deletions
+4 -4
View File
@@ -10,13 +10,13 @@ import { appEvents, AppEvent } from './events.js';
describe('events', () => {
it('should allow registering and emitting events', () => {
const callback = vi.fn();
appEvents.on(AppEvent.OauthDisplayMessage, callback);
appEvents.on(AppEvent.SelectionWarning, callback);
appEvents.emit(AppEvent.OauthDisplayMessage, 'test message');
appEvents.emit(AppEvent.SelectionWarning);
expect(callback).toHaveBeenCalledWith('test message');
expect(callback).toHaveBeenCalled();
appEvents.off(AppEvent.OauthDisplayMessage, callback);
appEvents.off(AppEvent.SelectionWarning, callback);
});
it('should work with events without data', () => {