import { useEventManager } from '@proton/components' ; import { Event } from '../../models/event' ; export const eventManagerListeners = [ ] ; ( ( useEventManager as any ) . subscribe as jest . Mock ) . mockImplementation ( ( listener ) => { eventManagerListeners . push ( listener ) ; } ) ; export const triggerEvent = ( event ) => { eventManagerListeners . forEach ( ( listener ) => listener ( event ) ) ; } ;